Author: dmeyer
Date: Mon Oct 31 19:12:12 2005
New Revision: 884

Modified:
   trunk/base/src/notifier/__init__.py
   trunk/base/src/notifier/thread.py

Log:
make it possible to wake up main thread

Modified: trunk/base/src/notifier/__init__.py
==============================================================================
--- trunk/base/src/notifier/__init__.py (original)
+++ trunk/base/src/notifier/__init__.py Mon Oct 31 19:12:12 2005
@@ -39,7 +39,7 @@
 from popen import Process
 from popen import killall as kill_processes
 from callback import Callback, WeakCallback, Signal, notifier
-from thread import MainThreadCallback, Thread, is_mainthread
+from thread import MainThreadCallback, Thread, is_mainthread, wakeup
 from timer import Timer, WeakTimer, OneShotTimer, WeakOneShotTimer
 from sockets import SocketDispatcher, WeakSocketDispatcher, \
      IO_READ, IO_WRITE, IO_EXCEPT

Modified: trunk/base/src/notifier/thread.py
==============================================================================
--- trunk/base/src/notifier/thread.py   (original)
+++ trunk/base/src/notifier/thread.py   Mon Oct 31 19:12:12 2005
@@ -45,7 +45,7 @@
 #
 # -----------------------------------------------------------------------------
 
-__all__ = [ 'MainThreadCallback', 'Thread', 'is_mainthread' ]
+__all__ = [ 'MainThreadCallback', 'Thread', 'is_mainthread', 'wakeup' ]
 
 # python imports
 import sys
@@ -148,6 +148,12 @@
 _thread_notifier_mainthread = threading.currentThread()
 
 
+def wakeup():
+    """
+    Wake up main thread.
+    """
+    os.write(_thread_notifier_pipe[1], "1")
+    
 def _thread_notifier_run_queue(fd):
     global _thread_notifier_queue
     _thread_notifier_lock.acquire()


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to