Hostname: page-component-8448b6f56d-mp689 Total loading time: 0 Render date: 2024-04-17T13:33:16.247Z Has data issue: false hasContentIssue false

A poor man's concurrency monad

Published online by Cambridge University Press:  01 May 1999

KOEN CLAESSEN
Affiliation:
Chalmers University of Technology (e-mail: koen@cs.chalmers.se)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

Without adding any primitives to the language, we define a concurrency monad transformer in Haskell. This allows us to add a limited form of concurrency to any existing monad. The atomic actions of the new monad are lifted actions of the underlying monad. Some extra operations, such as fork, to initiate new processes, are provided. We discuss the implementation, and use some examples to illustrate the usefulness of this construction.

Type
FUNCTIONAL PEARL
Copyright
1999 Cambridge University Press
Supplementary material: File

Claessen Supplementary Material

Download Claessen Supplementary Material(File)
File 699 Bytes
Submit a response

Discussions

No Discussions have been published for this article.