thanks to both of you for the hints. My situation is so simple that i guess
a twisted.python.threadable.isInIOThread() should suffice.
sandro
*:-)
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman
Le 11/05/2011 20:18, Alessandro Dentella a écrit :
> Hi,
>
>
> is there a way to test if the thread a function is called is the reactor's
> thread?
>
> I have a function that can be called from the main thread or from the
> reactor's thread and should behave differently...
Hi,
twisted.python.thre
Hi Alessandro,
On Wed, May 11, 2011 at 8:18 PM, Alessandro Dentella wrote:
> is there a way to test if the thread a function is called is the reactor's
> thread?
Yes, you can do it with code like this:
from threading import currentThread
if currentThread().getName() == 'MainThread':
# Code
Hi,
is there a way to test if the thread a function is called is the reactor's
thread?
I have a function that can be called from the main thread or from the
reactor's thread and should behave differently...
thanks
sandro
*:-)
--
Sandro Dentella *:-)
http://www.reteisi.org So