Macro calloop::batch_register
source · macro_rules! batch_register { ($poll:ident, $token_fac:ident, $( $source:expr ),* $(,)?) => { ... }; }
Expand description
Register a set of event sources. Effectively calls
EventSource::register()
for all the sources provided.
Usage:
calloop::batch_register!(
poll, token_factory,
self.source_one,
self.source_two,
self.source_three,
self.source_four,
)
Note that there is no scope for customisation; if you need to do special things with a particular source, you’ll need to leave it off the list. Also note that this only does try-or-early-return error handling in the order that you list the sources; if you need anything else, don’t use this macro.