IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo function

barrier

def barrier()

Performs a synchronization barrier at the block level.

This is equivalent to __syncthreads() in CUDA. All threads in a thread block must execute this function before any thread can proceed past the barrier. This ensures memory operations before the barrier are visible to all threads after the barrier.

Was this page helpful?