On Sun, 6 Mar 1999, Andrew Ritchie wrote: >>I was trying to figure out once - is there a minimum number of threads >>mandated in the standard? i.e. that all implementations must support >>at least 128 threads or something? I keep wondering if >>one-thread-per-player, which has some very nice benefits, is worth the >>performance cost. (The other end of the spectrum being a Squid-like >>design of a single thread that never, ever blocks for any reason -- >>even asynch I/O) > >For a one-thread-per-player-system, wouldn't you have to make sure that >global variables aren't being accessed at the same time by two or more >different threads? That's what I was told, anyhow. So you'd need a flagging >variable on each global variable (or even on playing structures, seeing as >they can be accessed by different threads) ... kind of like a INUSE/FREE >thing. This would be mighty troublesome, wouldn't you agree? It's a trade-off. You can hide that extra locking so that it's basically a non-issue for most code. The benefit of the thread-per-player is the other simplifications you can do. Blocking reads for instance. -- George Greer | CircleMUD Snippets greerga@circlemud.org | http://mouse.van.m-l.org/snippets/ +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST