i am running 2 threads and the text i display first is displayed after the execution of thread
string thread(string url)
{
mutex.lock();
//some function goes here
mutex.unlock();
}
int main()
{
cout<<"asd";
boost::thread t1(boost::bind(&thread));
boost::thread t2(boost::bind(&thread));
t1.join();
t2.join();
}
in the main program i have just displayed an text asd this displayed always after the execution of the thread ..
1 Answer