##// END OF EJS Templates
renamed Promise.Last -> Promise.On...
renamed Promise.Last -> Promise.On Promise.On doesn't changes Promise.IsExclusive property

File last commit:

r101:279e226dffdd v2
r104:5f10d54b45df v2
Show More
SyncContextPromise.cs
22 lines | 689 B | text/x-csharp | CSharpLexer
/ Implab / SyncContextPromise.cs
using System.Threading;
namespace Implab {
public class SyncContextPromise<T> : Promise<T> {
readonly SynchronizationContext m_context;
public SyncContextPromise(SynchronizationContext context) {
Safe.ArgumentNotNull(context, "context");
m_context = context;
}
public SyncContextPromise(SynchronizationContext context, IPromise parent)
: base(parent) {
Safe.ArgumentNotNull(context, "context");
m_context = context;
}
protected override void InvokeHandler(HandlerDescriptor handler) {
m_context.Post(x => base.InvokeHandler(handler),null);
}
}
}