Opened 16 years ago

Closed 16 years ago

#1667 defect closed invalid (invalid)

processEnded better not be called from thread context

Reported by: andrea Owned by:
Priority: high Milestone:
Component: core Keywords:
Cc: Branch:


here the details and a proposed fix:

Even the comment itself says it shouldn't run in between the standard "twisted atomic" (aka big kernel lock) context. Given I found this by pure luck, I think we would better make sure processEnded won't run in parallel with other twisted code.

To remain compatible with older twisted I added a wrapper that does this:

def processEnded(self, status):

reactor.callLater(0, self._processEnded, status)

That should be a safe workaround right?

Change History (2)

comment:1 Changed 16 years ago by Jean-Paul Calderone

Resolution: invalid
Status: newclosed

callFromThread runs a function in the reactor thread, not in another thread. The signal handler will always run processEnded in the reactor thread.

comment:2 Changed 11 years ago by <automation>

Owner: Glyph deleted
Note: See TracTickets for help on using tickets.