I want to use the boost threadpool library from open source(http://threadpool.sourceforge.net/) I am getting an complilation error with the example program itself.
/usr/include/boost/./threadpool/./detail/locking_ptr.hpp: In constructor âboost::threadpool::detail::locking_ptr::locking_ptr(volatile T&, const volatile Mutex&) [with T = boost::threadpool::detail::pool_core >, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks>, Mutex = boost::recursive_mutex]â:
/usr/include/boost/./threadpool/./detail/pool_core.hpp:331: instantiated from âbool boost::threadpool::detail::pool_core::resize(size_t) volatile [with Task = boost::function0 >, SchedulingPolicy = boost::threadpool::fifo_scheduler, SizePolicy = boost::threadpool::static_size, SizePolicyController = boost::threadpool::resize_controller, ShutdownPolicy = boost::threadpool::wait_for_all_tasks]â
/usr/include/boost/./threadpool/size_policies.hpp:75: instantiated from âstatic void boost::threadpool::static_size::init(Pool&, size_t) [with Pool = boost::threadpool::detail::pool_core >, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks>]â
/usr/include/boost/./threadpool/pool.hpp:103: instantiated from âboost::threadpool::thread_pool::thread_pool(size_t) [with Task = boost::fu开发者_JAVA技巧nction0 >, SchedulingPolicy = boost::threadpool::fifo_scheduler, SizePolicy = boost::threadpool::static_size, SizePolicyController = boost::threadpool::resize_controller, ShutdownPolicy = boost::threadpool::wait_for_all_tasks]â
./example/mergesort/mergesort.cpp:152: instantiated from here
/usr/include/boost/./threadpool/./detail/locking_ptr.hpp:50: error: âclass boost::recursive_mutexâ has no member named âlockâ
/usr/include/boost/./threadpool/./detail/locking_ptr.hpp: In destructor âboost::threadpool::detail::locking_ptr::~locking_ptr() [with T = boost::threadpool::detail::pool_core >, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks>, Mutex = boost::recursive_mutex]â:
/usr/include/boost/./threadpool/./detail/pool_core.hpp:331: instantiated from âbool boost::threadpool::detail::pool_core::resize(size_t) volatile [with Task = boost::function0 >, SchedulingPolicy = boost::threadpool::fifo_scheduler, SizePolicy = boost::threadpool::static_size, SizePolicyController = boost::threadpool::resize_controller, ShutdownPolicy = boost::threadpool::wait_for_all_tasks]â
/usr/include/boost/./threadpool/size_policies.hpp:75: instantiated from âstatic void boost::threadpool::static_size::init(Pool&, size_t) [with Pool = boost::threadpool::detail::pool_core >, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks>]â
/usr/include/boost/./threadpool/pool.hpp:103: instantiated from âboost::threadpool::thread_pool::thread_pool(size_t) [with Task = boost::function0 >, SchedulingPolicy = boost::threadpool::fifo_scheduler, SizePolicy = boost::threadpool::static_size, SizePolicyController = boost::threadpool::resize_controller, ShutdownPolicy = boost::threadpool::wait_for_all_tasks]â
./example/mergesort/mergesort.cpp:152: instantiated from here
/usr/include/boost/./threadpool/./detail/locking_ptr.hpp:58: error: âclass boost::recursive_mutexâ has no member named âunlockâ
Can someone help to solve this issue?
Regards, Anandan
Seems like it's not compatible with boost version you have installed. What Boost version you have?
精彩评论