Commit cc9435c
authored
Fix race condition in ReceivePersistentActor async handlers (#7873)
Fixed a race condition in Eventsourced.RunTask() where task continuation
options were incorrectly using bitwise AND instead of bitwise OR, resulting
in no flags being set (AttachedToParent & ExecuteSynchronously = 0).
The continuation was not executing synchronously as intended, causing async
handlers to complete before sending reply messages, leading to intermittent
timeout failures in tests like ReceivePersistentActorAsyncAwaitSpec.
This follows historical precedent from commits cb90ed2 and e2c01f7
which removed all usage of AttachedToParent throughout the codebase.
Changed TaskContinuationOptions from:
AttachedToParent & ExecuteSynchronously (evaluates to 0)
To:
ExecuteSynchronously
Fixes race condition where async message handlers would timeout waiting
for reply messages that arrived after the test timeout expired.1 parent d240738 commit cc9435c
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
577 | 577 | | |
578 | 578 | | |
579 | 579 | | |
580 | | - | |
| 580 | + | |
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
| |||
0 commit comments