destroy method
void
destroy()
Destroys the thread manager and all associated threads.
This method sets isDestroyed to true and destroys each thread in threads.
Implementation
void destroy() {
isDestroyed = true;
for (var model in threads) {
model.destroy();
}
}