[Twisted-Python] A problem with threads

Oct. 11, 2001
2:04 p.m.
Threadpool should have a function that lets you run a function in a thread and have the result passed to a Deferred object's callbacks. The callback functions in the Deferred should be run in the a thread-safe way. There two alternatives: 1) Run the callbacks in the main event loop thread, which means using twisted.internet.threadtask. This adds a dependency on twisted.internet for twisted.python. 2) Have the user implement the thread-safety stuff themselves. I think (1) is the best way, otherwise you end up having to do a lot of work everytime you use callbacks. But then there's the dependancy issue...
8555
Age (days ago)
8555
Last active (days ago)
1 comments
1 participants
participants (1)
-
Itamar Shtull-Trauring