Skip to main content

Mojo struct

ThreadRole

struct ThreadRole

Implemented traits

AnyType, Copyable, Enum, ImplicitlyCopyable, ImplicitlyDestructible, Movable, RegisterPassable, TrivialRegisterPassable, Writable

comptime members

CONSUMER

comptime CONSUMER = ThreadRole(1)

PRODUCER

comptime PRODUCER = ThreadRole(0)

PRODUCER_CONSUMER

comptime PRODUCER_CONSUMER = ThreadRole(2)

Methods

value

value(self) -> Int

Returns:

Int

__str__

__str__(self) -> String

Returns the string representation of this algorithm.

Returns:

String: String: A human-readable string representation of the algorithm.

write_to

write_to[W: Writer](self, mut writer: W)

Was this page helpful?