Struct serenity::client::bridge::gateway::ShardQueuer [] [src]

pub struct ShardQueuer<H: EventHandler + Send + Sync + 'static> {
    pub data: Arc<ParkingLotMutex<ShareMap>>,
    pub event_handler: Arc<H>,
    pub framework: Arc<Mutex<Option<Box<Framework + Send>>>>,
    pub last_start: Option<Instant>,
    pub manager_tx: Sender<ShardManagerMessage>,
    pub runners: Arc<ParkingLotMutex<HashMap<ShardId, ShardRunnerInfo>>>,
    pub rx: Receiver<ShardQueuerMessage>,
    pub token: Arc<Mutex<String>>,
    pub ws_url: Arc<Mutex<String>>,
}

The shard queuer is a simple loop that runs indefinitely to manage the startup of shards.

A shard queuer instance should be run in its own thread, due to the blocking nature of the loop itself as well as a 5 second thread sleep between shard starts.

Fields

Methods

impl<H: EventHandler + Send + Sync + 'static> ShardQueuer<H>
[src]

[src]