comparison Implab.Test/PromiseHelper.cs @ 77:91362ffbecf8 v2

ported tests to mono
author cin
date Thu, 11 Sep 2014 10:56:14 +0400
parents 3b8393be3441
children eb793fbbe4ea
comparison
equal deleted inserted replaced
76:c761fc982e1d 77:91362ffbecf8
1 using Implab.Parallels; 1 using Implab.Parallels;
2 using System;
3 using System.Collections.Generic;
4 using System.Linq;
5 using System.Text;
6 using System.Threading; 2 using System.Threading;
7 3
8 namespace Implab.Test { 4 namespace Implab.Test {
9 class PromiseHelper { 5 static class PromiseHelper {
10 public static IPromise<T> Sleep<T>(int timeout, T retVal) { 6 public static IPromise<T> Sleep<T>(int timeout, T retVal) {
11 return AsyncPool.Invoke(() => { 7 return AsyncPool.Invoke(() => {
12 Thread.Sleep(timeout); 8 Thread.Sleep(timeout);
13 return retVal; 9 return retVal;
14 }); 10 });