Skip to content

Commit

Permalink
fix threading
Browse files Browse the repository at this point in the history
  • Loading branch information
Wojciech Turowicz committed Nov 14, 2023
1 parent 069f1a2 commit 055ea6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Orleans.Streaming.Grains/Grains/TransactionGrain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public async Task FlushAsync()

private async Task FlushTimerAsync(object arg)
{
await this.AsReference<ITransactionGrain>().FlushAsync();
await Task.Run(async () => await this.AsReference<ITransactionGrain>().FlushAsync());
}

private async Task PersistAsync()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public async Task PersistAsync()

private async Task PersistTimerAsync(object arg)
{
await this.AsReference<ITransactionItemGrain<T>>().PersistAsync();
await Task.Run(async () => await this.AsReference<ITransactionItemGrain<T>>().PersistAsync());
}
}
}

0 comments on commit 055ea6a

Please sign in to comment.