You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Async method calls through the synchronous RunSync bridge were causing deadlocks due to improper synchronization context management
Continuations were being queued to the thread pool instead of the custom synchronization context, breaking the synchronous execution model
The CustomSynchronizationContext implementation needed alignment with the proven Rebus library implementation pattern
Deliverables
Context Management: Move synchronization context setup/teardown from RunSync into CustomSynchronizationContext.Run() for cleaner separation of concerns
Continuation Handling: Remove ConfigureAwait(false) from PostCallback to ensure all continuations execute on the custom context
API Consistency: Add ConfigureAwait(false) to RunSync method to maintain consistent async patterns
Code Clarity: Add comments explaining the context behavior and why ConfigureAwait is not used in PostCallback