spawn_event_poller

Function spawn_event_poller 

Source
pub fn spawn_event_poller(
    tx: UnboundedSender<RawEvent>,
    poll_timeout: Duration,
    loop_sleep: Duration,
    cancel_token: CancellationToken,
) -> JoinHandle<()>
Expand description

Spawn the event polling task with cancellation support

This spawns an async task that polls for crossterm events and sends them through the provided channel. The task can be cancelled using the token.

ยงArguments

  • tx - Channel to send raw events
  • poll_timeout - Timeout for each poll operation
  • loop_sleep - Sleep duration between poll cycles
  • cancel_token - Token to cancel the polling task