Skip to content

Commit

Permalink
Fix SingleThreadSynchronizationContext (#3857)
Browse files Browse the repository at this point in the history
To have its own thread use itself as the context.

Fixes #3856

(cherry picked from commit 38907e4)
  • Loading branch information
roji committed Jun 18, 2021
1 parent f022fa5 commit fb60757
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Npgsql/SingleThreadSynchronizationContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public void Dispose()

void WorkLoop()
{
SetSynchronizationContext(this);

try
{
while (true)
Expand Down

0 comments on commit fb60757

Please sign in to comment.