
Hello Vicente, thank you for looking through the code. Am Dienstag, 16. September 2008 07:37:47 schrieb vicente.botet:
* In adaptive and lazy add the assertion on constructor BOOST_ASSERT( lwm <= hwm);
I've romved the assertion because it is a runtime error (user defines vaules) and bounded_channel already checks high- and low watermark.
* In lazy std::size_t max_size() { return max_size_; } should't have a shared_lock guard.
Because max_size_ is a invariante I beleive it is safe to leave it unprotected (mutex).
Doesn't the following pools behaves identically
boost::tp::pool< boost::tp::fixed, boost::tp::unbounded_channel< boost::tp::fifo >
pool( boost::tp::max_poolsize( 10) );
boost::tp::pool< boost::tp::lazy< depend_on_core >, boost::tp::unbounded_channel< boost::tp::fifo >
pool( boost::tp::preallocate( 10),
boost::tp::core_poolsize( 10), boost::tp::max_poolsize( 10) );
boost::tp::pool< boost::tp::adaptive< depend_on_core, keep_core_size
,
boost::tp::unbounded_channel< boost::tp::fifo >
pool(
boost::tp::preallocate( 10), boost::tp::core_poolsize( 10), boost::tp::max_poolsize( 10), boost::posix_time::very_high );
yes
thread_management<fixed> to mean the current fixed thread_management<variable<AdjustmentPolicy> > to mean the current lazy<AdjustmentPolicy> thread_management<variable<AdjustmentPolicy, shrink<RecreatePolicy> > > What do you think?
Looks interesting - I've to think up how to realize it in C++. regards, Oliver