private static void DoSomething() { PrintState(); ThreadState.SetState(-1, DoSomethingElse); PrintState(); }
private static void Worker(object o) { int id = (int)o; ThreadState.SetState(id, DoSomething); }