blocking_02.gm 260 B

123456789101112131415161718
  1. /*
  2. Basic blocking and signalling #1
  3. */
  4. global thread_1 = function()
  5. {
  6. block("WAKEUP");
  7. print("I just woke up, boy was I tired!");
  8. };
  9. // Launch thread
  10. thread( thread_1 );
  11. // Sleep for 1 secs then set the wakeup variable
  12. sleep(1);
  13. signal("WAKEUP");