#include <iostream>
#include <boost/thread.hpp>
#include <boost/chrono.hpp>
using namespace boost;
using namespace std;

void mw (int tid) {
	cout << "Hello from thread[" << tid << "]" << endl;
	while (true) {
		this_thread::sleep_for(boost::chrono::milliseconds(100));
		cout << "[" << tid << "]" << endl;
	}
}

int main() {
	int count=1;
	int n;
	thread_group *tg=new thread_group();
	cout <<"give n:";
	cin >> n;
	for (int i=0;i<100;i++,count++) {
		tg->add_thread(new thread(mw,count));
	}
	tg->join_all();
	return 0;
}
