
15 Sep
2010
15 Sep
'10
12:24 p.m.
if I run the example boost_asio/example/http/client/async_client.cpp on a Windows 7 or Vista and set a breakpoint on the very last line (return 0;), VisualStudio tells me that (apart from the Main Thread) two Threads named Win32 Thread are still running.
These are internal asio threads.
My concern is, that a project which uses a lot of socket connections will end up with a dozen or more lingering threads. How can I avoid that?
No, AFAIK, the amount of these internal threads doesn't depend on the count of open sockets. You can open and close sockets/timers and see that you still have these 2 additional threads.