@@ -754,6 +754,9 @@ impl Node {
754
754
/// Will return `Some(..)` if an event is available and `None` otherwise.
755
755
///
756
756
/// **Note:** this will always return the same event until handling is confirmed via [`Node::event_handled`].
757
+ ///
758
+ /// **Caution:** Users must handle events as quickly as possible to prevent a large event backlog,
759
+ /// which can increase the memory footprint of [`Node`].
757
760
pub fn next_event ( & self ) -> Option < Event > {
758
761
self . event_queue . next_event ( )
759
762
}
@@ -763,6 +766,9 @@ impl Node {
763
766
/// Will asynchronously poll the event queue until the next event is ready.
764
767
///
765
768
/// **Note:** this will always return the same event until handling is confirmed via [`Node::event_handled`].
769
+ ///
770
+ /// **Caution:** Users must handle events as quickly as possible to prevent a large event backlog,
771
+ /// which can increase the memory footprint of [`Node`].
766
772
pub async fn next_event_async ( & self ) -> Event {
767
773
self . event_queue . next_event_async ( ) . await
768
774
}
@@ -772,6 +778,9 @@ impl Node {
772
778
/// Will block the current thread until the next event is available.
773
779
///
774
780
/// **Note:** this will always return the same event until handling is confirmed via [`Node::event_handled`].
781
+ ///
782
+ /// **Caution:** Users must handle events as quickly as possible to prevent a large event backlog,
783
+ /// which can increase the memory footprint of [`Node`].
775
784
pub fn wait_next_event ( & self ) -> Event {
776
785
self . event_queue . wait_next_event ( )
777
786
}
0 commit comments