Relative Content

Tag Archive for c#.netasync-awaitsemaphoresynchronizationcontext

Bug in SemaphoreSlim or custom SynchronizationContext?

In our code we have a threading abstraction similar to a Reactive EventLoopScheduler where we can post work to a single background thread. Our implementation has a facility for detecting if the call to post is already on thread and will execute the work synchronously. We also have an implementation of SynchronizationContext that will post to this thread. This is so continuation of async/awaits within the posted work will complete on the dedicated thread.