Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++11 thread_pool, futures, promises support in gcc

Is any of N2276 supported in gcc yet?

I am currently using 4.6.1, where std::thread seems to be working ok.

If not, should I be using boost's threadpool?

What is a good alternative/stopgap that allows for easy transition to an eventual futures, promises, and thread_pool?

Maybe this would work?

It looks like N2276 isn't listed here. I wonder if any of N2276's features are going to make it in - I thought I read about futures and promises and other paradigms going into C++11: will have to google around and see what's going on.

like image 339
kfmfe04 Avatar asked Oct 24 '22 14:10

kfmfe04


1 Answers

The gcc C++ library status page shows much of this is implemented: thread, packaged_task, future, promise are mostly in. As noted by others <threadpool> didn't make it in.

The TR2 library enhancement process is supposed to start in January. I would expect thread pools and many other things to be proposed very soon.

like image 124
emsr Avatar answered Oct 27 '22 09:10

emsr