public Promise Start() { var d = Deferred.Create(); var t = new Thread(() => { try { backgroundImpl(); d.Resolve(); } catch (Exception ex) { d.Reject(ex); } finally { this.Dispose(); } }); t.IsBackground = true; t.Start(); return(d.Promise); }
internal Promise(Deferred deferred) { this.myDeferred = deferred; }