std::thread t1(funkcja); // tworzy obiekt 't1', tworzy nowy wątek i uruchamia w nim 'funkcja()'. std::thread t2; // tworzy pusty obiekt 't2'. t2 = std::thread(funkcja); /* tworzy nowy obiekt w miejscu "t2", niszczy poprzedni obiekt, tworzy nowy wątek i uruchamia w nim 'funkcja()' */ // thread t3 = t2; // kod NIEPOPRAWNY – wątków nie można kopiować thread t3 = std::move(t2); // ale wątki można przesuwać std::thread t4(funkcja2, 1, 2, "z"); /* tworzy obiekt 't4', tworzy nowy wątek programu i uruchamia w nim 'funkcja2(1, 2, "z")'*/