Skip to content

Commit

Permalink
chore: Adjust for threading
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Sep 17, 2024
1 parent d93c4cd commit 0aa2701
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,17 @@ namespace JSInterop
{
internal static class InternalCalls
{
// Uno-Specific implementation for https://github.com/dotnet/runtime/issues/69409.
// To be removed when the runtime will support the main SynchronizationContext.
// [MethodImplAttribute(MethodImplOptions.InternalCall)]
#if NET9_0_OR_GREATER
public static void InvokeOnMainThread()
{
Console.WriteLine("invoking InvokeOnMainThread");
throw new Exception("InvokeOnMainThread not supported");
throw new NotSupportedException($"Uno Platform net9.0 does not support threading yet.");
}
#else
// Uno-Specific implementation for https://github.com/dotnet/runtime/issues/69409.
// To be removed when the runtime will support the main SynchronizationContext.
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public static extern void InvokeOnMainThread();
#endif
}
}
}

0 comments on commit 0aa2701

Please sign in to comment.