Closed kostya-sh closed 8 years ago
Swift is single-threaded yes. The language is multi-threaded but the Zewo runtime is based on libmill which is single-threaded.
Haskell is "safe-enough" that it doesn't crash.
MVar is a single-value channel which blocks on the next takeMVar
until there is a new value in the channel (putMVar
), so the increment is safe. Not sure about BasicHashTable, the mutation should probably be within the MVar
lock.
edit: fixed, the hashtable mutation is now done within the lock.
Thank you for the reply
This is not a bug report, just a question that I hope you can answer.
Comparing different versions of the applications I can see the following aproaches to avoid data races:
Go
Node.js
Reason
Haskell
swift-zewo
Thank you.