@@ -369,6 +369,12 @@ where {
369369 /// Blocks the current thread until next event is ready and returns it.
370370 ///
371371 /// Typically you would spawn a thread or task that calls this in a loop.
372+ ///
373+ /// **Note**: Users must handle events as soon as possible to avoid an increased event queue
374+ /// memory footprint. We will start dropping any generated events after
375+ /// [`MAX_EVENT_QUEUE_SIZE`] has been reached.
376+ ///
377+ /// [`MAX_EVENT_QUEUE_SIZE`]: crate::events::MAX_EVENT_QUEUE_SIZE
372378 #[ cfg( feature = "std" ) ]
373379 pub fn wait_next_event ( & self ) -> Event {
374380 self . pending_events . wait_next_event ( )
@@ -377,20 +383,38 @@ where {
377383 /// Returns `Some` if an event is ready.
378384 ///
379385 /// Typically you would spawn a thread or task that calls this in a loop.
386+ ///
387+ /// **Note**: Users must handle events as soon as possible to avoid an increased event queue
388+ /// memory footprint. We will start dropping any generated events after
389+ /// [`MAX_EVENT_QUEUE_SIZE`] has been reached.
390+ ///
391+ /// [`MAX_EVENT_QUEUE_SIZE`]: crate::events::MAX_EVENT_QUEUE_SIZE
380392 pub fn next_event ( & self ) -> Option < Event > {
381393 self . pending_events . next_event ( )
382394 }
383395
384396 /// Asynchronously polls the event queue and returns once the next event is ready.
385397 ///
386398 /// Typically you would spawn a thread or task that calls this in a loop.
399+ ///
400+ /// **Note**: Users must handle events as soon as possible to avoid an increased event queue
401+ /// memory footprint. We will start dropping any generated events after
402+ /// [`MAX_EVENT_QUEUE_SIZE`] has been reached.
403+ ///
404+ /// [`MAX_EVENT_QUEUE_SIZE`]: crate::events::MAX_EVENT_QUEUE_SIZE
387405 pub async fn next_event_async ( & self ) -> Event {
388406 self . pending_events . next_event_async ( ) . await
389407 }
390408
391409 /// Returns and clears all events without blocking.
392410 ///
393411 /// Typically you would spawn a thread or task that calls this in a loop.
412+ ///
413+ /// **Note**: Users must handle events as soon as possible to avoid an increased event queue
414+ /// memory footprint. We will start dropping any generated events after
415+ /// [`MAX_EVENT_QUEUE_SIZE`] has been reached.
416+ ///
417+ /// [`MAX_EVENT_QUEUE_SIZE`]: crate::events::MAX_EVENT_QUEUE_SIZE
394418 pub fn get_and_clear_pending_events ( & self ) -> Vec < Event > {
395419 self . pending_events . get_and_clear_pending_events ( )
396420 }
0 commit comments