Skip to content

Instantly share code, notes, and snippets.

@cogumbreiro
Forked from fcmartins/gist:5553998
Last active December 17, 2015 04:58
Show Gist options
  • Save cogumbreiro/5554053 to your computer and use it in GitHub Desktop.
Save cogumbreiro/5554053 to your computer and use it in GitHub Desktop.
public class Fin {
public static def main(s:Array[String](1)) {
finish {
val c = Clock.make();
async clocked(c) {
c.advance(); // deadlocks here
}
} // deadlocks here
}
}
public class Fin1 {
public static def main(s:Array[String](1)) {
val f = Clock.make();
val c = Clock.make();
async clocked(c, f) {
c.advance();
}
f.advance();
}
}
public class Fin {
public static def main(s:Array[String](1)) {
finish async {
val c = Clock.make();
async clocked(c) {
c.advance();
}
}
}
}
public class Fin1 {
public static def main(s:Array[String](1)) {
val f = Clock.make();
async clocked(f) {
val c = Clock.make();
async clocked(c, f) {
c.advance();
}
}
f.advance();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment