#include <thread>
#include <iostream>

struct Yoba {
	Yoba() { j = ++i; }
	void run(const char* desk) { std::cout << desk << ": " << j << std::endl; }
	static int i;
	int j;
};

int Yoba::i{ 0 };

int
main()
{
	Yoba y1{}; Yoba y2{}; Yoba y3{};
	auto th1 = std::thread(&Yoba::run, &y1, "alo");
	auto th2 = std::thread(&Yoba::run, &y3, "yoba");
	auto th3 = std::thread(&Yoba::run, &y2, "eto ti?");
	th1.join();
	th2.join();
	th3.join();
}