Module select

Source
Expand description

Interface to the select mechanism.

Structsยง

Operation
Identifier associated with an operation by a specific thread on a specific channel.
Select
Selects from a set of channel operations.
SelectedOperation
A selected operation that needs to be completed.
Token
Temporary data that gets initialized during select or a blocking operation, and is consumed by read or write.

Enumsยง

Selected
Current state of a select or a blocking operation.
Timeout ๐Ÿ”’
Determines when a select operation should time out.

Traitsยง

SelectHandle
A receiver or a sender that can participate in select.

Functionsยง

run_ready ๐Ÿ”’
Runs until one of the operations becomes ready, potentially blocking the current thread.
run_select ๐Ÿ”’
Runs until one of the operations is selected, potentially blocking the current thread.
select
Blocks until one of the operations becomes ready and selects it.
select_deadline ๐Ÿ”’
Blocks until a given deadline, or until one of the operations becomes ready and selects it.
select_timeout
Blocks for a limited time until one of the operations becomes ready and selects it.
try_select
Attempts to select one of the operations without blocking.