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

SpinWaiter

struct SpinWaiter

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

Fields

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

Implemented traits

AnyType, Defaultable, ImplicitlyDestructible

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.