
16 Dec
2007
16 Dec
'07
3:20 p.m.
On Dec 16, 2007 1:45 PM, Jules Bean
This needs to stand up to concurrent modification of a shared world structure, but I think I'll set up the concurrency controls after I get my head around this.t The simplest way to do this is to bundle all your big shared mutable world into a single MVar. What this amounts to is perfect brute force serialisation of the actual modification part: i.e. all world modifications share a global lock. This is easy to implement and easy to reason about.
If that turns out to be too restrictive, then you split up the MVars into smaller pieces, but then you have to think a bit harder to convince yourself it is safe.
STM! Why use Haskell concurrently and not use STM? STM is beautiful. Luke