1
This commit is contained in:
parent
ae2892cd49
commit
1d7840b984
@ -99,7 +99,7 @@ class _App:
|
||||
if msgid == _IM_DoneCallback:
|
||||
self._IMDoneCallback(callback)
|
||||
except Exception as e:
|
||||
f7.udplog.error('_dispatchIMMsg ' + str(e))
|
||||
f7.udplog.error('_dispatchIMMsg %d %s' % (msgid, str(e)))
|
||||
|
||||
def _addIMMsg(self, msgid, callback):
|
||||
self._immsgLock.acquire()
|
||||
@ -112,8 +112,12 @@ class _App:
|
||||
callback()
|
||||
|
||||
def createAsyncTask(self, done_callback, func, *args):
|
||||
assert self._listened
|
||||
def thread_func(args):
|
||||
func(args)
|
||||
try:
|
||||
func(args)
|
||||
except Exception as e:
|
||||
f7.udplog.error('_dispatchIMMsg ' + str(e))
|
||||
if done_callback:
|
||||
self._addIMMsg(_IM_DoneCallback, done_callback)
|
||||
thread = threading.Thread(target = thread_func, args = args)
|
||||
|
Loading…
x
Reference in New Issue
Block a user