Re: std::async from C++11 does not work

2016-03-15 Thread Yaakov Selkowitz
On 2016-03-15 19:00, Ilya Razenshteyn wrote: I'm trying to compile and run the below code. As a result, only one copy of "f" is being executed at a time, that is, no new threads are spawned. Does anyone know what's going on? Could be your code. I tried other code[1] using std::async, and mult

std::async from C++11 does not work

2016-03-15 Thread Ilya Razenshteyn
Hi all, I'm trying to compile and run the below code. As a result, only one copy of "f" is being executed at a time, that is, no new threads are spawned. Does anyone know what's going on? cygwin 2.4.1, gcc 5.3.0, compilation options are "g++ test.cpp -o test -O3 -Wall -std=c++11 -lpthread".