Read without ads and support Scribd by becoming a Scribd Premium Reader.
 
Multicoreprogramming inHaskell
Simon MarlowMicrosoft Research
 
A concurrent web server
server :: Socket -> IO ()server sock =forever(doacc <-Network.acceptsockforkIO(http acc))
 
create a new threadfor each new clientthe client/serverprotocol is implementedin a single-threaded way
 
Concurrency = abstraction
Threads let us implement individualinteractions separately, but have them happen
“at the same time”
writing this with a single event loop is complexand error-prone
Concurrency is for making your program
cleaner 
.
Search History:
Searching...
Result 00 of 00
00 results for result for
  • p.
  • More From This User

    Notes
    Load more