Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
335 B

  1. function state1()
  2. {
  3. ::suspend("state1");
  4. return state2();
  5. }
  6. function state2()
  7. {
  8. ::suspend("state2");
  9. return state3();
  10. }
  11. function state3()
  12. {
  13. ::suspend("state3");
  14. return state1();
  15. }
  16. local statethread = ::newthread(state1)
  17. ::print(statethread.call()+"\n");
  18. for(local i = 0; i < 10000; i++)
  19. ::print(statethread.wakeup()+"\n");