- it synchronously called on main loop thread. it should be asynchronously called
/// <since_tizen> preview </since_tizen>
public static void PostAndWakeUp(Action task)
{
- int id = RegistHandler(() => { task(); return false; });
- Interop.Ecore.ecore_main_loop_thread_safe_call_async(_nativeHandler, (IntPtr)id);
+ if (IsMainThread)
+ {
+ Post(task);
+ }
+ else
+ {
+ int id = RegistHandler(() => { task(); return false; });
+ Interop.Ecore.ecore_main_loop_thread_safe_call_async(_nativeHandler, (IntPtr)id);
+ }
}
/// <summary>