C6258
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at C6258.
warning C6258: using TerminateThread does not allow proper thread clean up.
This warning indicates that a call to TerminateThread has been detected.
TerminateThread is a dangerous function that should only be used in the most extreme cases. For more information about problems associated with TerminateThread call, see this topic in the MSDN Library: TerminateThread.
To properly terminate threads
Create an event object using the
CreateEventfunction.Create the threads.
Each thread monitors the event state by calling the
WaitForSingleObjectfunction.Each thread ends its own execution when the event is set to the signaled state (
WaitForSingleObjectreturnsWAIT_OBJECT_0).
See one of the following topics for more information: