Bug 999323: Clean up thread resource in Nuwa.