[MUD-Dev] Re: TECH: Distributed Muds

John Buehler johnbue at msn.com
Sat Apr 28 23:07:14 CEST 2001


shren writes:

> 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.

JB

_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list