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
package sslnpn; | |
import java.io.IOException; | |
import org.junit.Test; | |
public class StackMapTest { | |
private boolean check; |
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
/* scalac -P:continuations:enable */ | |
import scala.util.continuations._ | |
import scala.collection.mutable._ | |
class Future[A] private (ctx: => A @suspendable) { | |
private var res:Option[A] = None | |
def await() : A @suspendable = { | |
if (res.isEmpty) { |
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 scala.util.continuations._ | |
import scala.collection.mutable._ | |
class Future { | |
def await : Unit @suspendable = { | |
/* .... */ | |
shift { k : (Unit => Unit) => | |
} | |
} |
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
function pause(t) { | |
waitfor() { | |
window.setTimeout(resume, t); | |
} | |
} | |
var object = { | |
pause_then_alert : function() { | |
pause(1000); |
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
rm -rf / |
NewerOlder