Skip to content

Instantly share code, notes, and snippets.

@joshthecoder
Created February 1, 2010 23:47
Show Gist options
  • Save joshthecoder/292188 to your computer and use it in GitHub Desktop.
Save joshthecoder/292188 to your computer and use it in GitHub Desktop.
import threading/[Runnable, Thread]
MyRunnable: class extends Runnable {
run: func {
// do work here
}
}
t := Thread new(MyRunnable new())
t start()
// Also allow creating threads from closures maybe...
t2 := Thread new(func { // do work })
t2 start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment