Author: dmeyer
Date: Fri Jul 13 09:27:06 2007
New Revision: 2759
Log:
small thread fixes
Modified:
trunk/base/src/notifier/thread.py
Modified: trunk/base/src/notifier/thread.py
==============================================================================
--- trunk/base/src/notifier/thread.py (original)
+++ trunk/base/src/notifier/thread.py Fri Jul 13 09:27:06 2007
@@ -156,6 +156,25 @@
self.join()
+ def start(self):
+ """
+ Start the thread and return an InProgress object.
+ """
+ if not _thread_notifier_pipe:
+ # Make sure the pipe is created in the mainloop _before_ we
+ # start the thread. If we do not do that it could be possible
+ # that the thread needs to create this and it will add the
+ # socket to an already blocking select() which will never
+ # wake up on that new socket.
+ _create_thread_notifier_pipe()
+
+ r = InProgress()
+ self.signals['completed'].connect_once(r.finished)
+ self.signals['exception'].connect_once(r.exception)
+ super(Thread, self).start()
+ return r
+
+
def run(self):
"""
Call the function and store the result
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog