Example #1
0
	void try_connect() {
		bool f = false;
		if (!connecting.compare_exchange_strong(f, true))
			return;
		
		connector.swap(std::thread(std::bind(&transport_t::thread_connect, this)));
		connector.detach();
		return;
	}