Boost logo

Boost :

Subject: Re: [boost] Asio - is it possible not to remove descriptor from epoll?
From: Gruenke, Matt (mgruenke_at_[hidden])
Date: 2011-03-23 16:58:03


Can't you simply put the descriptor in non-blocking mode and, in your async_read handler, perform further non-async reads until the waiting data is exhausted? I don't know how ASIO uses epoll, but if it's doing an add-and-remove for every async operation, you'd at least get rid of the overhead of extra adds & removes while data is still wating.
 
 
Matt
 

________________________________

From: boost-bounces_at_[hidden] on behalf of Vlad Lazarenko
Sent: Wed 3/23/2011 4:27 PM
To: boost_at_[hidden]
Subject: [boost] Asio - is it possible not to remove descriptor from epoll?

Guys,

Is it possible to make ASIO keep descriptor in epoll and not remove it
automatically after event is fired (and implement or emulate the same
behavior for other mechanisms like select, kqueue etc)?
My use case is very simple - I am reading data from multicast socket. One
read at a time, always reusing the same buffer. The performance is very
critical. Another use case is to give ASIO a null buffer and perform sync
read yourself when data is available, in that case you can read from tcp/ip
sockets as well. I know that libevent supports this but was not able to find
out how to do it with Asio. If it is not available, would someone be able to
assist in adding this feature?

Thank you,
Vlad

--
*Vlad Lazarenko*
*Lazarenko.me <http://lazarenko.me>*
vlad_at_[hidden] <vlad_at_lazarenko.me>
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk