Concurrent programming in ATS

FYI.

I did an implementation of the classic Producer-Consumer problem:

http://www.ats-lang.org/EXAMPLE/EFFECTIVATS/Producer-Consumer

I really feel that ATS shines brightly when handling concurrent
programming. In
particular, the availability of linear types can make a huge difference in
preventing
misuse of locks.

Cheers!

–Hongwei

Here is a simple implementation of channels:

https://github.com/githwxi/ATS-Postiats/blob/master/contrib/libats-hwxi/teaching/mythread/SATS/channel.sats
https://github.com/githwxi/ATS-Postiats/blob/master/contrib/libats-hwxi/teaching/mythread/DATS/channel.dats

Please see the following example for some code making use of channels:

https://github.com/githwxi/ATS-Postiats/tree/master/doc/EXAMPLE/EFFECTIVATS/DiningPhil2/On Saturday, November 16, 2013 9:32:53 PM UTC-5, gmhwxi wrote:

FYI.

I did an implementation of the classic Producer-Consumer problem:

http://www.ats-lang.org/EXAMPLE/EFFECTIVATS/Producer-Consumer

I really feel that ATS shines brightly when handling concurrent
programming. In
particular, the availability of linear types can make a huge difference in
preventing
misuse of locks.

Cheers!

–Hongwei