nodejs-tw / ama

Ask me anything!
MIT License
31 stars 1 forks source link

關於wrap函數實作問題 #18

Closed josudoey closed 6 years ago

josudoey commented 7 years ago

目的

想寫一個wrap函式 來處理對於async函數上 避免race condition的問題

遇到的問題

不確定有沒有其他處理方式 想問問看大家有沒有其他解法 問題如下

var self={name:'joey'};
var func=function(){}.bind(self);

想知道有沒有方式 可以從func的instance上取得self 而不直接使用self

相關連結

https://github.com/josudoey/promise4solo

josudoey commented 6 years ago

沒有其他方式可取得