Boost logo

Boost Users :

Subject: [Boost-users] TCP resolver creates TppWorkerThreads on windows only
From: Chris Stankevitz (chrisstankevitz_at_[hidden])
Date: 2014-07-14 16:04:21


Hello,

When I run the following code on windows, some threads are created,
presumably by winsock. These threads are "named" _TppWorkerThread.
This does not happen on linux.

These threads do not stop when all the boost objects go out of scope,
but I wish they did.

Q1: Am I doing something wrong?

Q2: Is there a boost way for me to stop these threads?

Thank you,

Chris

int main()
{
  {
    boost::asio::io_service DummyIoService;

    boost::asio::ip::tcp::resolver Resolver(DummyIoService);

    Resolver.resolve(
      boost::asio::ip::tcp::resolver::query("localhost", "3000"));
  }

  // At this point, there are three extra threads running:
  //
  // _TppWorkerThread_at_4 _ZwWaitForWorkViaWorkerFactory_at_8
  // _TppWorkerThread_at_4 _ZwWaitForWorkViaWorkerFactory_at_8
  // _TppWaiterpThread_at_4 _ZwWaitForMultipleObjects_at_20

  return 0;
}


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