summaryrefslogtreecommitdiff
path: root/rts/Capability.c
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-02-25 12:23:38 -0500
committerBen Gamari <ben@smart-cactus.org>2021-03-01 10:11:39 -0500
commit2628d61fb84674b8b891f4ad79837e61d7c65421 (patch)
treea88c2b353b60e7c887d6a2c63dc33fb830370e57 /rts/Capability.c
parent915daf51357175fcc31a37c0aaf2347875560269 (diff)
downloadhaskell-2628d61fb84674b8b891f4ad79837e61d7c65421.tar.gz
rts/eventlog: Ensure that all capability buffers are flushed
The previous approach performed the flush in yieldCapability. However, as pointed out in #19435, this is wrong as it idle capabilities will not go through this codepath. The fix is simple: undo the optimisation, flushing in `flushEventLog` by calling `flushAllCapsEventsBufs` after acquiring all capabilities. Fixes #19435.
Diffstat (limited to 'rts/Capability.c')
-rw-r--r--rts/Capability.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/Capability.c b/rts/Capability.c
index c3ef3929d9..136a62a71e 100644
--- a/rts/Capability.c
+++ b/rts/Capability.c
@@ -982,7 +982,7 @@ yieldCapability
break;
case SYNC_FLUSH_EVENT_LOG:
- flushLocalEventsBuf(cap);
+ /* N.B. the actual flushing is performed by flushEventLog */
break;
default: