summaryrefslogtreecommitdiff
path: root/rts/win32/AsyncMIO.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/win32/AsyncMIO.c')
-rw-r--r--rts/win32/AsyncMIO.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/rts/win32/AsyncMIO.c b/rts/win32/AsyncMIO.c
index 00d1638d63..6230512eeb 100644
--- a/rts/win32/AsyncMIO.c
+++ b/rts/win32/AsyncMIO.c
@@ -318,14 +318,16 @@ start:
: END_TSO_QUEUE;
}
- // Terminates the run queue + this inner for-loop.
- tso->_link = END_TSO_QUEUE;
- tso->why_blocked = NotBlocked;
// save the StgAsyncIOResult in the
// stg_block_async_info stack frame, because
// the block_info field will be overwritten by
// pushOnRunQueue().
tso->stackobj->sp[1] = (W_)tso->block_info.async_result;
+
+ tso->why_blocked = NotBlocked;
+ tso->block_info.closure = (StgClosure *)END_TSO_QUEUE;
+ // Terminates the run queue + this inner for-loop.
+ tso->_link = END_TSO_QUEUE;
pushOnRunQueue(&MainCapability, tso);
break;
}