Created
February 1, 2010 23:47
-
-
Save joshthecoder/292188 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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