Skip to content

Conversation

pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented Feb 5, 2025

In hope it would solve some of the deadlocks, by introducing __sync_synchronize which I believe is atomic.fence

#106094
#104492
#104203

@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-VM-threading-mono os-browser Browser variant of arch-wasm labels Feb 5, 2025
@pavelsavara pavelsavara added this to the 10.0.0 milestone Feb 5, 2025
@pavelsavara pavelsavara self-assigned this Feb 5, 2025
@pavelsavara pavelsavara changed the title [browser] emscripten_atomic_fence [browser] mono_memory_barrier Feb 5, 2025
@pavelsavara pavelsavara changed the title [browser] mono_memory_barrier [browser][MT] add memory barriers before sending messages to other workers Feb 6, 2025
mono_memory_barrier_process_wide (void)
{
#ifndef DISABLE_THREADS
mono_memory_barrier ();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this is not enough for GC. Maybe we need to set barrier on all threads ? How?

@pavelsavara pavelsavara requested a review from kg February 6, 2025 10:20
@pavelsavara
Copy link
Member Author

Alternatively there is emscripten_atomic_fence but I can't find the way how to #include it

@github-actions github-actions bot locked and limited conversation to collaborators Mar 20, 2025
@pavelsavara pavelsavara deleted the browser_MT_barrier branch September 10, 2025 12:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-VM-threading-mono os-browser Browser variant of arch-wasm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant