
25 May
2007
25 May
'07
2:01 p.m.
On Wed, 23 May 2007 22:18:53 +0700, "Владислав Чернышов" <carter.subscribe@gmail.com> said:
Hi!
If I do something like this can I be sure that async requests will run concurrently? boost::asio::io_service io_service; client c(io_service, argv[1], argv[2]); client c1(io_service, argv[1], argv[2]); boost::thread tr1(boost::bind(&boost::asio::io_service::run, &io_service)); io_service.run(); tr1.join();
The client class is a class from boost.asio example.
What do you mean by "async requests"? With two threads calling io_service::run(), your completion handlers will be able to run concurrently. The actual asynchronous operations would run concurrently even if you only had one thread calling io_service::run(). Cheers, Chris