Skip to content

Commit e2849c6

Browse files
committed
add fence to io thread
1 parent 78a817d commit e2849c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/threading.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,13 +709,15 @@ void jl_utility_io_threadfun(void *arg)
709709
jl_ptls_t ptls = jl_current_task->ptls;
710710
int8_t gc_state = jl_gc_safe_enter(ptls);
711711
while (1) {
712+
jl_fence(); // [^store_buffering_2]
712713
if (jl_atomic_load_relaxed(&jl_uv_n_waiters) == 0)
714+
{
713715
if (JL_UV_TRYLOCK_NOGC())
714716
{
715717
jl_process_events_locked();
716718
JL_UV_UNLOCK_NOGC();
717719
}
718-
// TODO: jl_fence(); // [^store_buffering_2]
720+
}
719721
}
720722
jl_gc_safe_leave(ptls, gc_state);
721723
return;

0 commit comments

Comments
 (0)