Closed sonygod closed 4 years ago
[question] how to use await with MainLoop.addThread?
target:HashLink
@async static function load(){ return Future.async(function(cb) { MainLoop.addThread(function():Void { var c = Http.requestUrl("http://news.cyol.com/content/2019-09/02/content_18139090.htm"); trace("finish"); cb(Success(true)); }); }); } @async static function main() { @await load();//not work trace("ok"); }
@kevinresol
[question] how to use await with MainLoop.addThread?
target:HashLink