internal static void Install() { get_eventloop get = GetCurrentSynchronizationContext; post_on_event_loop post = PostOnSynchronizationContext; release_eventloop release = ReleaseSynchronizationContext; // prevent the delegates from ever being garbage collected GCHandle.Alloc(get); GCHandle.Alloc(post); GCHandle.Alloc(release); install_eventloop_callbacks(get, post, release); }
private static extern void install_eventloop_callbacks(get_eventloop get, post_on_event_loop post, release_eventloop release);