No announcement yet.

Thread close

  • Filter
  • Time
  • Show
Clear All
new posts

    Thread close


    1. The documentation concerning threads states that you need to
    close thread in order to release the thread's handle. The
    example provided in the helpfile doesn't do this however.

    2. The thread status function return 0 when it fails to obtain
    the status. What are the reasons to fail the status request.

    So here we are, this is the end.
    But all that dies, is born again.
    - From The Ashes (In This Moment)

    Windows will take care of the handle when the process is terminated - not the best programming practice
    to no close a handle when finished with it but usually of no consequence as long as it is not a practice that runs amuck.
    If your thread is no longer running (it has run its course or the thread function has been exited) there is no thread status
    to return - thus ZERO status. You merely have an orphaned handle which should be closed.

    Closing a thread's handle does not affect a running thread.