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 struct

Bars

struct Bars

Fields​

  • ​base (SPtr[SharedMemBarrier]):

Implemented traits​

AnyType, Copyable, Deinitable, ImplicitlyCopyable, Movable, RegisterPassable, TrivialRegisterPassable

Methods​

__init__​

def __init__(smem: SPtr[UInt8], off: Int) -> Self

full​

def full[ring: Int](self, slot: Int32) -> SPtr[SharedMemBarrier]

Returns:

SPtr[SharedMemBarrier]

empty​

def empty[ring: Int, depth: Int](self, slot: Int32) -> SPtr[SharedMemBarrier]

Returns:

SPtr[SharedMemBarrier]

wait_full​

def wait_full[ring: Int, depth: Int](self, mut cu: Cursor) -> Int32

Returns:

Int32

wait_empty​

def wait_empty[ring: Int, depth: Int](self, mut cu: Cursor) -> Int32

Returns:

Int32

init_ring​

def init_ring[base: Int, depth: Int, full: Int, empty: Int](self)

Was this page helpful?