File: demo3.hs

package info (click to toggle)
haskell-concurrent-output 1.10.21-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 164 kB
  • sloc: haskell: 1,180; makefile: 4
file content (14 lines) | stat: -rw-r--r-- 382 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import Control.Concurrent.Async
import System.Console.Concurrent
import System.Process

main = withConcurrentOutput $
	outputConcurrent "hello world\n"
		`concurrently`
	createProcessConcurrent (proc "ls" [])
		`concurrently`
	createProcessConcurrent (proc "who" [])
		`concurrently`
	createProcessForeground (proc "vim" [])
		`concurrently`
	outputConcurrent "hello world again\n"