Clean up thread resource in Nuwa
Bug 970307: Check thread of main process to find a point for Nuwa to start to freeze