Update of /cvsroot/freevo/kaa/base/src/notifier
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11203
Modified Files:
thread.py
Log Message:
Explicitly return None in MainThreadCallback for asynchronous invocation.
Index: thread.py
===================================================================
RCS file: /cvsroot/freevo/kaa/base/src/notifier/thread.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** thread.py 25 Jul 2005 21:29:07 -0000 1.6
--- thread.py 29 Jul 2005 22:16:48 -0000 1.7
***************
*** 81,87 ****
if not self._async:
self.lock.acquire()
- return self._sync_return
else:
self._sync_return = super(MainThreadCallback,
self).__call__(*args, **kwargs)
--- 81,95 ----
if not self._async:
+ # Synchronous execution: wait for main call us and collect
+ # the return value.
self.lock.acquire()
+ return self._sync_return
+
+ # Asynchronous: explicitly return None here. We could return
+ # self._sync_return and there's a chance it'd be valid even
+ # in the async case, but that's non-deterministic and dangerous
+ # to rely on.
+ return None
else:
self._sync_return = super(MainThreadCallback,
self).__call__(*args, **kwargs)
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog