Ticket #3030 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

The first parameter of twisted.internet.threads.blockingCallFromThread should be reactor

Reported by: exarkun Owned by: exarkun
Priority: highest Milestone: twisted-8.0
Component: core Keywords:
Cc: Branch: branches/blockingcallfromthread-arg-3030
Author: exarkun Launchpad Bug:

Description

Global state is bad and stuff. Parameterization is great and stuff.

Any function which uses a global reactor variable should probably be parameterized instead.

This should happen before the next release, since it's not a compatible change. Fortunately blockingCallFromThread hasn't been part of any release yet.

Change History

Changed 3 years ago by exarkun

  • branch set to branches/blockingcallfromthread-arg-3030
  • author set to exarkun

(In [22588]) Branching to 'blockingcallfromthread-arg-3030'

Changed 3 years ago by exarkun

  • keywords review added
  • owner glyph deleted
  • priority changed from normal to highest

Changed 3 years ago by therve

  • owner set to exarkun
  • keywords review removed
  • I'm not sure making the reactor import at the top is a great change... whatever
  • please add a test-case-name to wsgi.py

Please merge once done.

Changed 3 years ago by exarkun

  • status changed from new to closed
  • resolution set to fixed

(In [22598]) Merge blockingcallfromthread-arg-3030

Author: exarkun Reviewer: therve Fixes #3030

Change the signature of twisted.internet.threads.blockingCallFromThread to take the reactor into which it will call as the first parameter. Update the docs and the usage in twisted.web2 as well.

Note: See TracTickets for help on using tickets.