Update runtime.ts

fixed the bug:Deleted thread from thread_pool incorrectly.