[Twisted-Python] Deferring execution to a specific thread
Sorin C.
soso_pub at yahoo.com
Sat May 1 12:45:23 EDT 2004
Hi,
--- Samuel Reynolds <sam at SpinwardStars.com> wrote:
> Maybe...
> Post the deferred to a queue *and* return it to the
> caller;
> only the query thread reads from that queue. On
> completion
> of the query, mark the deferred complete (is that
> right, gurus?)
> and delete it from the queue.
>
> - Sam
Yes, only that using deferToThread does not guarantee
that the operation will be deferred to the same
thread.
I thought about limiting the thread pool to exactly 1
thread but it is no option because in the future I
might need othr usual worker threads.
Anyway, I solved it using a custom thread and call in
the main thread with callFromThread.
I thought there might be a way to defer to a specific
thread so I don't need to use custom threads but it's
alright like this also.
Sorin
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
More information about the Twisted-Python
mailing list