NEOLearn

Async task examples

The engine's async task examples: what each one shows, whether it runs in a browser and the command that runs it.

Updated October 20, 2026

On this page

Running work on the task pools and getting the results back into the world. There are 3 examples on this page. For the concepts behind them, see Tasks.

Run any of them from the engine core's workspace (the folder of the engine source that holds the neo crate's Cargo.toml); see Run an example.

Examples#

ExampleWhat it showsWebRun
Async Channel PatternAn example showing how to offload work to background async tasks using channels for communication.Yescargo run --example async_channel_pattern
Async ComputeHow to use AsyncComputeTaskPool to complete longer running tasksNocargo run --example async_compute
External Source of Data on an External ThreadHow to use an external thread to run an infinite task and communicate with a channelNocargo run --example external_source_external_thread

See also#