Boost logo

Boost Users :

Subject: Re: [Boost-users] ASIO Win32 Thread not terminated
From: Igor R (boost.lists_at_[hidden])
Date: 2010-09-15 08:24:18


> 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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net