Skip to content

Commit d6ce79b

Browse files
committed
add fence to io thread
1 parent d069692 commit d6ce79b

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
@@ -707,13 +707,15 @@ void jl_utility_io_threadfun(void *arg)
707707
jl_ptls_t ptls = jl_current_task->ptls;
708708
int8_t gc_state = jl_gc_safe_enter(ptls);
709709
while (1) {
710+
jl_fence(); // [^store_buffering_2]
710711
if (jl_atomic_load_relaxed(&jl_uv_n_waiters) == 0)
712+
{
711713
if (JL_UV_TRYLOCK_NOGC())
712714
{
713715
jl_process_events_locked();
714716
JL_UV_UNLOCK_NOGC();
715717
}
716-
// TODO: jl_fence(); // [^store_buffering_2]
718+
}
717719
}
718720
jl_gc_safe_leave(ptls, gc_state);
719721
return;

0 commit comments

Comments
 (0)