2011/8/29 PcX <xunxun1982@gmail.com>
于 2011/8/29 20:04, Ruben Van Boxem 写道:
> I am experiencing a std::system_error: Operation not permitted. in a
> simple std::thread::join example.
Can you supply some examples?


This is as simple as it gets (and as complicated as I can use std::thread :) ):
#include <iostream>
#include <thread>

using namespace std;

void f()
{
  cout << "Hello from thread" << endl;
}
int main()
{
    thread t(f);
    thread s(f);
   
    t.join();
    s.join();
    return 0;
}

Ruben
 

Thanks.

--
Best Regards,
PcX


------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public