Postgres & mio::Poll.poll

hello,

can i wait for notifications on a postgres connection and an udp socket (and/or a serial port) at the same time ?

i monitor several udp sockets (mio::net::UdpSocket from mio crate) and serial ports (mio_serial::Serial from mio-serial crate) for readable events using mio::Poll

can i add the postgres connection to mio::Poll ?

i do not have to use the mio crates, how can i block the program execution until a postgres notification is received or a packet on a udp sockect or a byte on a serial port ?

thanks,
razvan radu

1 Like