##// END OF EJS Templates
implemeted new cancellable promises concept
implemeted new cancellable promises concept

File last commit:

r10:aa33d0bb8c0c promises
r10:aa33d0bb8c0c promises
Show More
PromiseHelper.cs
16 lines | 395 B | text/x-csharp | CSharpLexer
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace Implab.Test {
class PromiseHelper {
public static Promise<T> Sleep<T>(int timeout, T retVal) {
return AsyncPool.Invoke(() => {
Thread.Sleep(timeout);
return retVal;
});
}
}
}