i gr8 wrote:
detect thread end
Which thread? Are you creating any new thread? Can you please explain in detail?
"Never put off until run time what you can do at compile time." - David Gries, in "Compiler Construction for Digital Computers", circa 1969.