I/O and Processes
Contributors: Anirudh Gupta
This chapter covers various topics related to I/O and processes, threads and concurrency in Lean. Lean has great support for running tasks concurrently and provides a powerful API for handling I/O operations. We use the IO monad to perform our operations.
In Lean, it is important to understand the difference in Process, Threads and Tasks. When you spawn a child process, Lean gives you a handle to the OS process. When you spawn an internal computation, Lean gives you a Task. Hence Task is not a schedulable entity at the OS level.
Recipes: