summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs
diff options
context:
space:
mode:
authorSeungkeun Lee <sngn.lee@samsung.com>2016-11-01 08:43:06 +0900
committerSeungkeun Lee <sngn.lee@samsung.com>2016-11-01 09:09:02 +0900
commitf4769328c5643a7b236d63d5f269b2d9c0935951 (patch)
tree9785cffde39e6a9a2694d08800898d55f8be9ad7 /Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs
parent7971d97ca0ecf12964e52ec59322ee8cfb4598f1 (diff)
downloadxamarin-forms-f4769328c5643a7b236d63d5f269b2d9c0935951.tar.gz
xamarin-forms-f4769328c5643a7b236d63d5f269b2d9c0935951.tar.bz2
xamarin-forms-f4769328c5643a7b236d63d5f269b2d9c0935951.zip
Fix BeginInvokeOnMainThread
- If current thread is main thread, directly call instead of post - Rollback SynchronizationContext - Add IsInvokedREquired implementation Change-Id: Ia00c9ca80038d6aeca9a5e2a42e69aaa5073be64
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs')
-rw-r--r--Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs16
1 files changed, 10 insertions, 6 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs b/Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs
index ea7dbc0b..37354959 100644
--- a/Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs
+++ b/Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs
@@ -70,10 +70,7 @@ namespace Xamarin.Forms.Platform.Tizen
private void HandleElapsed(object state)
{
- s_context.Post(delegate (object o)
- {
- SendSignals(-1);
- }, null);
+ s_context.Post((o) => SendSignals(-1), null);
}
}
@@ -104,7 +101,14 @@ namespace Xamarin.Forms.Platform.Tizen
public void BeginInvokeOnMainThread(Action action)
{
- s_context.Post((o) => action(), null);
+ if (ElmSharp.EcoreMainloop.IsMainThread)
+ {
+ action();
+ }
+ else
+ {
+ s_context.Post((o) => action(), null);
+ }
}
public Xamarin.Forms.Internals.Ticker CreateTicker()
@@ -179,7 +183,7 @@ namespace Xamarin.Forms.Platform.Tizen
{
get
{
- return false;
+ return !ElmSharp.EcoreMainloop.IsMainThread;
}
}