aboutsummaryrefslogtreecommitdiffstats
path: root/src/scenario/Future.js
blob: cc40eff0ba43af7b912203750476cab610c6c6b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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;
  }
};