私は現在、M Laverdet ノードファイバーを試していますが、とても気に入っています。しかし、スコープの問題で立ち往生しています。誰かが何が起こっているのかを理解するのを手伝ってくれることを願っています.
ファイバーの "bind()" を実行するにはどうすればよいですか?
WindowMonitor.prototype.throttled_check = function(site_list) {
var future = new Future();
var results = [];
var push_result = (function(err, val) {
results.push(val);
this.logEvent(val); //this works
Fiber(function() {
doSomething().wait();
this.logEvent(val); //this does not
console.log(actualStats);
}).run();
this.monitorBuffer.push(val);
if (results.length === site_list.length) {
future.return (results);
}
}).bind(this);
//more unrelevant things here including the 'return future'
};