aboutsummaryrefslogtreecommitdiffstats
path: root/src/scenario/Future.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/scenario/Future.js')
-rw-r--r--src/scenario/Future.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/scenario/Future.js b/src/scenario/Future.js
new file mode 100644
index 00000000..d70e8e6e
--- /dev/null
+++ b/src/scenario/Future.js
@@ -0,0 +1,13 @@
+function Future(name, behavior) {
+ this.name = name;
+ this.behavior = behavior;
+ this.fulfilled = false;
+ this.value = undefined;
+}
+
+Future.prototype = {
+ fulfill: function(value) {
+ this.fulfilled = true;
+ this.value = value;
+ }
+};