From: Robert W. B. <rb...@di...> - 2001-08-23 15:17:42
|
Hello Silvio, The "no current thread" message is unique to v2.0. It is a debug message in the threading.py module that has since been commented out (in versions 2.1+). If you're curious, looking at threading.py explains why it happes, but it is safe to comment it out. line ~520, in the following function. def currentThread(): try: return _active[_get_ident()] except KeyError: print "currentThread(): no current thread for", _get_ident() return _DummyThread() The offending line is the print statement obviously, so you can just change to: ##print "currentThread(): no current thread for:, _get_ident() On Thu, 23 Aug 2001, Silvio Arcangeli wrote: > Hello everybody, again on asynchronous callback. > I am interacting with the Java API of a CORBA server. Some operations > cannot return an immediate result, and so if I want to know the result of > the operation I have to register a callback object (that must implement an > interface provided with the API) to be called asynchronously from the API > when the operation is completed. > I corrected some bugs (I forgot the self attribute, argh!) and now my > asynchronous callback object works, but I have a strange output message > from Jython. > > My code is just like this: > > # implementation of ReportReceiver interface > class getReport(ReportReceiver): > def __init__(self,): > self.received=threading.Event() # event to notify that report has > been received > > def receiveReport(...): # callback method called by the API > ... > self.received.set() > return > > #main program > # register to get the report > receiver=getReport() > registerForReports(receiver) > > # call a CORBA operation > .. > > # and then wait until the report is received > receiver.received.wait() > unregisterForReports() > > > When i execute it it works fine, but Jython prints the following message on > standard output: > currentThread(): no current thread for 2006345 > > (ok, the number can be any:)) > it writes this message just after the receiveReport method sets its > received event. > What is the reason for this message and what does it mean? > > ciao, > Silvio. > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users > |