|
Boost : |
From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2005-12-16 06:30:40
Hi,
--- christopher baus <christopher_at_[hidden]> wrote:
> It seems there is an OS imposed limit on the queue depth in
> Windows. Another reason I wrote this is that I think a hard
> limit should be put in the reactive servers as so we don't end
> up with runaway applications. We should at least to attempt to
> stop enqueueing operations before the OMM killer has its way
> with us.
Yep, sorry I haven't replied to your related email on event
throttling... still trying to catch up on digesting all the emails!
I think this hard limit could be made configurable by adding a new
class/service pair. E.g.:
template <typename Allocator = std::allocator<void> >
class limits_service
{
...
};
template <typename Service>
class basic_limits
{
public:
basic_limits(demuxer_type& d);
void post_queue(std::size_t value);
std::size_t post_queue() const;
... and so on ...
};
typedef basic_limits<limits_service<> > limits;
Usage:
boost::asio::demuxer d;
boost::asio::limits l(d);
l.post_queue(42);
Any suggestions about what sort of numbers should be used by default?
Cheers,
Chris
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk