Skip to main content
Log in

Mojo struct

SpinWaiter

A proxy for the C++ runtime's SpinWaiter type.

Fields

  • storage (UnsafePointer[NoneType, 0, 0, alignof[::AnyType,__mlir_type.!kgen.target]() if triple_is_nvidia_cuda() else 1]): Pointer to the underlying SpinWaiter instance.

Implemented traits

AnyType

Methods

__init__

__init__(inout self: Self)

Initializes a SpinWaiter instance.

__del__

__del__(owned self: Self)

Destroys the SpinWaiter instance.

wait

wait(self: Self)

Blocks the current task for a duration determined by the underlying policy.

Was this page helpful?