Skip to content

Instantly share code, notes, and snippets.

@machisuji
Created March 23, 2011 16:45
Show Gist options
  • Save machisuji/883443 to your computer and use it in GitHub Desktop.
Save machisuji/883443 to your computer and use it in GitHub Desktop.
Thread.start {
println("Waiting for Godot")
synchronized ("Godot") {
"Godot".wait()
}
println("Godot never came")
}
println("Press <return> to continue")
new BufferedReader(new InputStreamReader(System.in)).readLine()
synchronized ("Godot") {
"Godot".notify()
}
println("That's it.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment