problem in threading c++
<p>i am running 2 threads and the text i display first is displayed after the execution of thread </p>

<pre><code>string thread(string url)
{
    mutex.lock();
    //some function goes here 
    mutex.unlock();
}

int main()
{
    cout&lt;&lt;"asd";

    boost::thread t1(boost::bind(&amp;thread)); 
    boost::thread t2(boost::bind(&amp;thread));

    t1.join();
    t2.join();
}
</code></pre>

<p>in the main program i have just displayed an text <code>asd</code> this displayed always after the execution of the thread .. </p>
