Mojo struct
ThreadRole
@register_passable(trivial)
struct ThreadRole
Implemented traits
AnyType,
Copyable,
ImplicitlyCopyable,
Movable,
Stringable,
UnknownDestructibility,
Writable
Aliases
__copyinit__is_trivial
alias __copyinit__is_trivial = True
__del__is_trivial
alias __del__is_trivial = True
__moveinit__is_trivial
alias __moveinit__is_trivial = True
CONSUMER
alias CONSUMER = ThreadRole(1)
PRODUCER
alias PRODUCER = ThreadRole(0)
PRODUCER_CONSUMER
alias PRODUCER_CONSUMER = ThreadRole(2)
Methods
__eq__
__ne__
__is__
__isnot__
__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?
Thank you! We'll create more content like this.
Thank you for helping us improve!