Stream: cranelift

Topic: ✔ Multithreading in crane lift


view this post on Zulip Cregg (May 29 2024 at 19:23):

How could I go about achieving multithreading in a programming language compiled with cranelift? Is this a solved problem or do I have to implement it myself? If so am I better off offloading it to c?

view this post on Zulip Chris Fallin (May 29 2024 at 19:24):

Should be largely orthogonal to the compiler backend: whatever multithreading primitives you need should be implemented in your language's runtime (e.g., starting threads, mutex locks, etc.) If you need to implement low-level synchronization primitives in Cranelift-compiled code, it does have atomic instructions (see atomic_rmw and atomic_cas as well as atomic_load, atomic_store)

view this post on Zulip Cregg (May 29 2024 at 19:37):

Thanks for the information!

view this post on Zulip Notification Bot (Sep 08 2024 at 13:45):

Till Schneidereit has marked this topic as resolved.


Last updated: Dec 23 2024 at 12:05 UTC