Boost logo

Boost Users :

Subject: [Boost-users] ASIO Win32 Thread not terminated
From: Manuel Drews (manuel.drews_at_[hidden])
Date: 2010-09-15 07:02:25


Hi all,

I have a question regarding boost::asio:

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.

Since the whole ASIO code is within the try block, everything connected to the sockets should be terminated when leaving the block, right?

I get this behaviour also in a custom project, where I explicitly call close on the socket.

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?

Thanx in advance

Manuel

-- 
GMX DSL SOMMER-SPECIAL: Surf & Phone Flat 16.000 für nur 19,99 Euro/mtl.!*
http://portal.gmx.net/de/go/dsl

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