So how do you write a CSP scheduler? This is essentially wingo's talk, but much simpler. Simplify: - Tasks can only suspend on channel read write. - When a task suspends, if it has a partner, resume the partner, then resume the task. Otherwise, add to wait queue. There is one complication: select needs to be able to wait on multiple channels.