Munksgaard / session-types

MIT License
550 stars 21 forks source link

examples/many-clients: Use only session-typed channels #55

Closed laumann closed 5 years ago

laumann commented 5 years ago

I think this is one of the early examples we made. It uses the now-deprecated std::sync::mpsc channels to spawn many threads and pass over Chan types.

Replace the use of std::sync::mpsc::{channel, Receiver} with proper session-typed channels. This also goes to demonstrate that Chan protocols can send other Chan types (ie we can pass channels through channels).

laumann commented 5 years ago

Rebased on master