internal void Remove(Thread t) { lock (threads) { threads.Remove (t); } }
void InternalRun() { wrapperThread = this; try { Runnable.Run(); } catch (Exception exception) { System.Diagnostics.Debug.WriteLine(exception); } finally { tgroup.Remove(this); } }