Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PrismaPhonic/tokio-context
/ functions
Functions
21 in github.com/PrismaPhonic/tokio-context
⨍
Functions
21
◇
Types & classes
4
↓ 4 callers
Method
cancel
Cancels the Context, ensuring that done() returns immediately. We only need to drop the handle, which will drop the sender. Doing so will close the c
src/context.rs:196
↓ 4 callers
Method
spawn_ctx
Will spawn a context identical to the context that was created along with this Handle. Used to generate more receivers for receiving a cancel signal f
src/context.rs:200
↓ 2 callers
Method
spawn
Spawns tasks using an identical API to tokio::task::spawn. Tasks spawned from this TaskController will obey the optional timeout that may have been su
src/task.rs:83
↓ 1 callers
Method
cancel
Call cancel() to cancel any tasks spawned by this TaskController. You can also simply drop the TaskController to achieve the same result.
src/task.rs:56
Function
cancel_handle_cancels_context
()
src/context.rs:360
Function
cancel_handle_cancels_task
()
src/task.rs:114
Function
cancelling_child_ctx_doesnt_cancel_parent
()
src/context.rs:398
Function
cancelling_parent_ctx_cancels_child
()
src/context.rs:383
Method
done
We expect a receive error that the channel was closed.
src/context.rs:274
Function
duration_cancels_context
()
src/context.rs:372
Function
duration_cancels_task
()
src/task.rs:126
Method
from
(ctx: Context)
src/context.rs:349
Function
missing_send_trait_done_of_ref_context
()
src/context.rs:425
Method
new
Constructs a new TaskController, which can be used to spawn tasks. Tasks spawned from the task controller will be cancelled if `cancel()` gets called.
src/task.rs:60
Method
new
Builds a new Context without a timeout. The `done` method returns a future that will complete when this context is cancelled.
src/context.rs:227
Function
parent_timeout_cancels_child
()
src/context.rs:413
Method
spawn_ref
Will spawn a RefContext identical to the RefContext that was created along with this Handle. If a Context was created with this handle, it will spawn
src/context.rs:219
Function
task_that_takes_too_long
()
src/context.rs:448
Method
with_parent
Builds a new Context, chained to a parent context. When `done` is called off a chained context it will return a future that will complete when either
src/context.rs:256
Method
with_timeout
Constructs a new TaskController, which can be used to spawn tasks. Tasks spawned from the task controller will be cancelled if `cancel()` gets called.
src/task.rs:71
Method
with_timeout
Builds a new Context. The `done` method returns a future that will complete when either the handle is cancelled, or when the supplied timeout has elap
src/context.rs:239