Re: [asio-users] immediately stopio_service fromexecuting furtherwork (but not with strands??)
Brought to you by:
chris_kohlhoff
From: Gruenke, M. <mgruenke@Tycoint.com> - 2012-06-27 17:18:14
|
Batching is an optimization. Optimizations should not violate correctness (by default). If you want to add batching, please make it configurable and set the default batch size to be 1. Matt -----Original Message----- From: Marat Abrarov [mailto:ab...@ma...] Sent: Wednesday, June 27, 2012 12:58 PM To: asi...@li... Subject: Re: [asio-users] immediately stopio_service fromexecuting furtherwork (but not with strands??) > I wouldn't bother with batching. As you point out, it should be > inexpensive to check. > > I consider it a bug that strands don't strictly respect > io_service::stop(). Since batching would still run afoul of that, I > consider it incorrect. Batching is needed. It's a classical multithread tradeoff. But it would be rightly to give users of strand an opportunity to configure max size of such batching (optional second parameter of strand's constructor). Regards, Marat Abrarov. ------------------------------------------------------------------------ ------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ asio-users mailing list asi...@li... https://lists.sourceforge.net/lists/listinfo/asio-users _______________________________________________ Using Asio? List your project at http://think-async.com/Asio/WhoIsUsingAsio |