3import Control.Distributed.Process
4import Control.Concurrent (threadDelay)
6import Network.Transport (closeTransport)
7import Network.Transport.TCP (mkTransport, TCPConfig (..))
12 trans <- mkTransport $ TCPConfig undefined "127.0.0.1" "8080"
13 node <- newLocalNode trans
16 liftIO $ print "Starting process"
17 lpid1 <- spawnLocal (logger 1)
18 spawnLocal (chatty "jim1" lpid1)
19 spawnLocal (chatty "bob1" lpid1)
24chatty :: String -> ProcessId -> Process ()
25chatty name target = do
26 send target (name ++ " says: hi there")
27 liftIO $ threadDelay 500000
28 send target (name ++ " says: bye")
30logger :: Int -> Process ()
33 liftIO . putStrLn $ show n ++ ": " ++ str
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list