[MUD-Dev] Re: TECH: Distributed Muds
johnbue at msn.com
Sat Apr 28 23:07:14 New Zealand Standard Time 2001
> I find the key to working with threads is state diagrams. Your
> threads have to clearly be in one state or another, to make a
> coherent design.
Agreed. Note that the same statement also applies to even reentrancy
of single-threaded code. Each time you call out to another chunk of
code, you have to consider the state of your data structures.
Mistakes in these sorts of things usually come to the surface after
changes in design of code you call out to. Even without violating
contracts, it's possible to produce reentrancies that didn't exist
before, possibly hosing data structures that weren't being protected
because of assumptions made when the code was first written - that
there weren't any reentrancies.
Not a real common problem with straightforward designs that use
vertical layering, but certainly the sort of thing that develops in
projects that are bigger than just a couple people. The more generic
the code that you write, the more often it pops up.
MUD-Dev mailing list
MUD-Dev at kanga.nu
More information about the MUD-Dev