Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. function t1 () { var i = 0; while (1) {print ("t1"+i++); coroutine.lthread_sleep();}}
  2. function t2 () { var i = 0; while (1) {print ("t2"+i++); coroutine.lthread_sleep();}}
  3. co = coroutine.lthread_create(t1);
  4. co2 = coroutine.lthread_create(t2);
  5. coroutine.lthread_resume(co);
  6. coroutine.lthread_resume(co2);
  7. coroutine.lthread_resume(co);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement