diff MonoPlay/Program.cs @ 156:97fbbf816844 v2

Promises: SignalXXX methods merged into SignalHandler method. Components: RunnableComponent In progress
author cin
date Mon, 15 Feb 2016 04:22:15 +0300
parents ec91a6dfa5b3
children 4f82e0f161c3
line wrap: on
line diff
--- a/MonoPlay/Program.cs	Fri Feb 12 16:24:24 2016 +0300
+++ b/MonoPlay/Program.cs	Mon Feb 15 04:22:15 2016 +0300
@@ -1,12 +1,5 @@
 using System;
-using Implab.Diagnostics;
-using Implab.Parallels;
 using Implab;
-using System.Collections.Generic;
-using System.Collections.Concurrent;
-using System.Threading;
-using Implab.JSON;
-using System.IO;
 using System.Threading.Tasks;
 
 namespace MonoPlay {
@@ -27,7 +20,10 @@
         }
 
         static IPromise<int> DoItem(int x) {
-            return Promise<int>.FromResult(x + 1);
+            //return Promise<int>.FromResult(x + 1);
+            var p = new Promise<int>();
+            p.Resolve(x+1);
+            return p;
         }
 
         static async Task<int> DoWork() {