Skip to main content

Module host

Module host 

Source
Expand description

Sub-worlds, which share the host’s thread. Host helpers: the sub-world that shares the host’s thread.

Re-exports§

use async_channel::Receiver; 🔒
use async_channel::bounded; 🔒
use unlit_ecs::Bundle; 🔒
use unlit_ecs::DynamicBundle; 🔒
use unlit_ecs::World; 🔒
use crate::channel::publish_collected; 🔒
use crate::executor::LocalTasks; 🔒
use crate::handle::WorldHandle; 🔒
use crate::job::Job; 🔒
use crate::job::JobSender; 🔒
use crate::thread::ThreadStatus; 🔒
use crate::thread::panic_message; 🔒
use crate::world::WorldName; 🔒
use unlit_ecs::bundle; 🔒

Structs§

HostWorld 🔒
The host entity a nested world hangs on: the world itself, under the name a bridge lists it by.
SubWorld 🔒
The sub-world’s own state: the inbox its jobs arrive in and the status it publishes.
SubWorldInbox 🔒
The sub-world’s command inbox, a component of the nested world itself.
SubWorldStatus 🔒
The sub-world’s status, published the way a threaded world publishes its own, so a host learns that its sub-world ended.

Functions§

drain_sub_world
Run every job queued for the sub-world so far, in queue order.
spawn_sub_world
Spawn a sub-world that shares the host’s thread, nested as a World component of the returned entity, with a command inbox of the given capacity.