1

I have a Console application that has many worker threads. I don't think that it's a good idea to close an application before closing the worker threads.

So is there a way to know when a Console application is about to close so I can send a message to the worker threads asking them to close themselves?

1 Answers1

0

Maybe you can use windows message queue api to detect when the console is to close, and the handle the close message dispatched by windows as you want to close the worker threads.

JhonChin
  • 1
  • 3