簡體   English   中英

Boost線程池庫中的問題

[英]problem in boost threadpool library

我想使用開放源代碼( http://threadpool.sourceforge.net/ )中的boost線程池庫,示例程序本身出現了一個編譯錯誤。

/usr/include/boost/./threadpool/./detail/locking_ptr.hpp:在構造函數â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:從âboolboost :: 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:從靜態static 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:從â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:從此處實例化

/usr/include/boost/./threadpool/./detail/locking_ptr.hpp:50:錯誤:“ class boost :: recursive_mutex”沒有名為“ lock”的成員

/usr/include/boost/./threadpool/./detail/locking_ptr.hpp:在析構函數â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:從âboolboost :: 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:從靜態static 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:從â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:從此處實例化

/usr/include/boost/./threadpool/./detail/locking_ptr.hpp:58:錯誤:“ class boost :: recursive_mutex”沒有名為“ unlock”的成員

有人可以幫助解決這個問題嗎?

問候,阿南丹

似乎與您安裝的增強版不兼容。 您擁有什么Boost版本?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM