Author: remi
Date: 2009-06-10 10:11:52 +0200 (Wed, 10 Jun 2009)
New Revision: 4765
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/eventhandler/TuxEventHandler.py
Log:
* Execute callbacks asynchronous to prevent dead lock callback methods (which
slow the events processing)
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/eventhandler/TuxEventHandler.py
===================================================================
---
software_suite_v3/smart-core/smart-server/trunk/util/eventhandler/TuxEventHandler.py
2009-06-09 13:02:08 UTC (rev 4764)
+++
software_suite_v3/smart-core/smart-server/trunk/util/eventhandler/TuxEventHandler.py
2009-06-10 08:11:52 UTC (rev 4765)
@@ -171,11 +171,14 @@
def __run(self, functPtr, idx, fArgs):
"""Run a callback method.
"""
- try:
- functPtr(*fArgs)
- except:
- print self.__formatException()
- self.unregister(idx)
+ def async():
+ try:
+ functPtr(*fArgs)
+ except:
+ print self.__formatException()
+ self.unregister(idx)
+ t = threading.Thread(target = async)
+ t.start()
def emit(self, *fArgs):
"""Emit a signal on the event handler with a set of parameters.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn