There are some examples in my introduction to the C++0x thread library on DevX: http://www.devx.com/SpecialReports/Article/38883
Here's a simple example program that launches two threads:
#include <thread>
#include <mutex>
#include <iostream>
#include <chrono>
std::mutex iom;
void thread_func(int id)
{
for(unsigned i=0;i<1000;++i)
{
std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::lock_guard<std::mutex> lk(iom);
std::cout<<"Thread "<<id<<" ";
}
}
int main()
{
std::thread t1(thread_func,1);
std::thread t2(thread_func,2);
t2.join();
t1.join();
}