Top "Synchronizationcontext" questions

A .NET target to dispatch some work to.

Why would I bother to use Task.ConfigureAwait(continueOnCapturedContext: false);

Consider the following code of windows forms: private async void UpdateUIControlClicked(object sender, EventArgs e) { this.txtUIControl.Text = "I will …

c# async-await synchronizationcontext
How to get a Task that uses SynchronizationContext? And how are SynchronizationContext used anyway?

I am still learning the whole Task-concept and TPL. From my current understanding, the SynchronizationContext functions (if present) are used …

c# async-await synchronizationcontext
Using SynchronizationContext for sending events back to the UI for WinForms or WPF

I'm using a SynchronizationContext to marshal events back to the UI thread from my DLL that does a lot of …

.net wpf multithreading synchronizationcontext
Why is TaskScheduler.Current the default TaskScheduler?

The Task Parallel Library is great and I've used it a lot in the past months. However, there's something really …

c# .net task-parallel-library conceptual synchronizationcontext
Why is SynchronizationContext.Current null in my Winforms application?

I just wrote this code: System.Threading.SynchronizationContext.Current.Post( state => DoUpdateInUIThread((Abc)state), abc); but System.Threading.SynchronizationContext.…

c# winforms multithreading synchronizationcontext
What is the difference between SynchronizationContext.Send and SynchronizationContext.Post?

Thanks to Jeremy Miller's good work in Functional Programming For Everyday .NET Development, I have a working command executor that …

c# multithreading threadpool conceptual synchronizationcontext
Get SynchronizationContext from a given Thread

I seem not to find how to get the SynchronizationContext of a given Thread: Thread uiThread = UIConfiguration.UIThread; SynchronizationContext context = …

c# multithreading .net-3.5 synchronizationcontext
Semaphore Wait vs WaitAsync in an async method

I'm trying to find out what is the difference between the SemaphoreSlim use of Wait and WaitAsync, used in this …

c# concurrency semaphore synchronizationcontext
What do I do with async Tasks I don't want to wait for?

I am writing a multi player game server and am looking at ways the new C# async/await features can …

c# asynchronous task-parallel-library async-await synchronizationcontext
When to call SynchronizationContext.SetSynchronizationContext() in a UI application?

I'm learning about the SynchronizationContext class. I'm trying to understand what are the common usage scenarios for calling SynchronizationContext.SetSynchronizationContext() …

c# wpf winforms multithreading synchronizationcontext