Skip to main content

Mojo struct

SpinWaiter

struct SpinWaiter

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

Fields

  • storage (UnsafePointer[NoneType, origin_of()]): Pointer to the underlying SpinWaiter instance.

Implemented traits

AnyType, Defaultable, UnknownDestructibility

Aliases

__del__is_trivial

comptime __del__is_trivial = False

Methods

__init__

__init__(out self)

Initializes a SpinWaiter instance.

__del__

__del__(deinit self)

Destroys the SpinWaiter instance.

wait

wait(self)

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

Was this page helpful?