Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
731 views
in Technique[技术] by (71.8m points)

c++ - Creating a thread pool using boost

Is it possible to create a thread pool using boost's thread? i was looking all over boost's libs and I couldn't find a thread pool manager (or something like that)... Is there a way to do it?

tnx!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I know an answer has been accepted, if you need this right now, and you can't be bothered to write your own thread pool, you could try using boost asio io_service with a concurrency hint (i.e. how many threads it should run) and then post() stuff to this io_service... just an idea..


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.9k users

...