diff options
author | George Hazan <george.hazan@gmail.com> | 2014-03-16 20:31:39 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-03-16 20:31:39 +0000 |
commit | 91cccbcb4d7cade5702b59b36c0c66a02dea73d7 (patch) | |
tree | 21eaf63f1dc77ad2ff279687f3c1aeb3837177c5 | |
parent | 7a18e9f478a5f0baa7df3634fb72957965223148 (diff) |
minor optimization
git-svn-id: http://svn.miranda-ng.org/main/trunk@8642 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | src/mir_core/modules.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mir_core/modules.cpp b/src/mir_core/modules.cpp index 6899a2dbf3..ae122eb0f3 100644 --- a/src/mir_core/modules.cpp +++ b/src/mir_core/modules.cpp @@ -563,7 +563,10 @@ MIR_CORE_DLL(INT_PTR) CallServiceSync(const char *name, WPARAM wParam, LPARAM lP MIR_CORE_DLL(int) CallFunctionAsync(void (__stdcall *func)(void *), void *arg)
{
- QueueMainThread((PAPCFUNC)func, arg, 0);
+ if (GetCurrentThreadId() == mainThreadId)
+ func(arg);
+ else
+ QueueMainThread((PAPCFUNC)func, arg, 0);
return 0;
}
|