Merge branch 'master' of git.martlubbers.net:clean-tests
authorMart Lubbers <mart@martlubbers.net>
Mon, 23 Mar 2020 07:34:17 +0000 (08:34 +0100)
committerMart Lubbers <mart@martlubbers.net>
Mon, 23 Mar 2020 07:34:17 +0000 (08:34 +0100)
1  2 
cloudiTasks/cloudiTasks.icl
cloudiTasks/slave/cloudiTasks

@@@ -10,15 -10,28 +10,26 @@@ master :: Task (
  master
        = get applicationOptions
        >>- \eo->traceValue ("Master started on port " +++ toString eo.serverPort)
 +//    >-| set 42 (remoteShare (sharedStore "bork" 42) {domain="localhost",port=9099})
  //    >-| asyncTask (ExistingNode "localhost" 9099) (blockWait 5)
  //    >-| asyncTask "localhost" 9090 (blockWait 5)
  //    >-| asyncTask (PrivateNode 9099) (traceValue 5 >-| traceValue 42)
 -      >-| asyncTaskSpawn 9099 (return 42)
 -      >-| asyncTaskSpawn 9099 (updateInformation [] 42)
 -//    >-| (updateInformation [] 42 -&&- updateInformation [] 22) @. ("localhost", 9099)
 -//    >-| asyncTaskSpawn 9099 (updateInformation [] 42 -&&- updateInformation [] 22)
 +      >-| asyncTask "localhost" 9099 (updateInformation [] 5)
  //    >-| sleepSortPar [5,1,3,8]
        >&^ viewSharedInformation []
        @! ()
  
+ asyncTaskChannel :: !String !Int !((sds () (Queue r) w) -> Task a) !((sds () (Queue w) r) -> Task b) -> Task (a, b)
+ asyncTaskChannel host port remote local
+       =    asyncTask host port (remote shareTo)
+       -&&- 
+ where
+       shareTo :: (sds () (Queue r) (Queue r))
+       shareTo = sdsFocus ("to-" +++ host +++ toString port) $ memoryStore "asyncITasks-channels" (Just newQueue)
+       shareFro :: (sds () (Queue w) (Queue w))
+       shareFro = sdsFocus ("fro-" +++ host +++ toString port) $ memoryStore "asyncITasks-channels" (Just newQueue)
  blockWait :: Int -> Task Int
  blockWait i = accWorld (sleep i)
  where
diff --combined cloudiTasks/slave/cloudiTasks
index 6c6bf4d,6c6bf4d..0000000
deleted file mode 100755,100755
Binary files differ