Author: tack
Date: Mon Jan 7 19:13:13 2008
New Revision: 2954
Log:
Rename set_mainthread to set_as_mainthread; add is_shutting_down() function.
Modified:
trunk/base/src/notifier/main.py
trunk/base/src/notifier/thread.py
Modified: trunk/base/src/notifier/main.py
==============================================================================
--- trunk/base/src/notifier/main.py (original)
+++ trunk/base/src/notifier/main.py Mon Jan 7 19:13:13 2008
@@ -42,11 +42,11 @@
import nf_wrapper as notifier
from callback import Signal
from popen import proclist as _proclist
-from thread import MainThreadCallback, is_mainthread, wakeup, set_mainthread
+from thread import MainThreadCallback, is_mainthread, wakeup, set_as_mainthread
from jobserver import killall as kill_jobserver
from decorators import execute_in_mainloop
-__all__ = [ 'init', 'start', 'stop', 'step', 'is_running', 'wakeup',
'set_mainthread' ]
+__all__ = [ 'init', 'start', 'stop', 'step', 'is_running', 'wakeup',
'set_as_mainthread', 'is_shutting_down' ]
# get logging object
log = logging.getLogger('notifier')
@@ -114,7 +114,7 @@
global _running
_running = True
- set_mainthread()
+ set_as_mainthread()
try:
while True:
notifier.step()
@@ -138,6 +138,9 @@
def is_running():
return _running
+def is_shutting_down():
+ return _shutting_down
+
def _set_running(status):
global _running
_running = status
Modified: trunk/base/src/notifier/thread.py
==============================================================================
--- trunk/base/src/notifier/thread.py (original)
+++ trunk/base/src/notifier/thread.py Mon Jan 7 19:13:13 2008
@@ -214,7 +214,7 @@
os.write(_thread_notifier_pipe[1], "1")
-def set_mainthread():
+def set_as_mainthread():
global _thread_notifier_mainthread
global _thread_notifier_pipe
_thread_notifier_mainthread = threading.currentThread()
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog