[MUD-Dev] Multi-threaded programming under Linux

Nathan Yospe yospe at hawaii.edu
Tue Jul 22 15:25:03 New Zealand Standard Time 1997


On Tue, 22 Jul 1997, Greg Munt wrote:

:(Referring to a threaded mud implementation)

:> Linux pthreads is pretty poor atm.  I spent a couple of weeks finding out
:> loads about the threads library - it opens up all sorts of cool
:> possibilities, but it would be more hassle than it was worth - the
:> pthreads library is not stable, libg++ is not thread safe, as are the io
:> functions in libc.... The list goes on.  On top of all this, you have to
:> take the added precautions that all multithreaded programs must have - eg
:> the database would have to support locking, checking, etc.

:I always thought Nathan was working with gcc. And I'm *sure* Physmud++ is 
:threaded - isn't it?

:Any comments on the above? I would really like to start with threads, 
:rather than decide to rewrite nearly everything at a later date; but 
:would it be more hassle than it's worth?

:Those who have a threaded server, what OS/dev tools are you using? Is 
:Linux currently the wrong choice for anything serious in this area?

I'm using g++ for the solaris version, but I am using solaris threads, not
pthreads, and with my own wrapper library. And I'm not using libg++... not
even for io, which consists of my own wrapper library for sockets, loosely
based on (but not using) Socket++. File io is done through a modified
version of the same. And I don't have a database... the threads operate
over the containment layer, which means concurency is never an issue.
(message passing needn't be concurent, exactly)

"You? We can't take you," said the Dean, glaring at the Librarian.
"You don't know a thing about guerilla warfare." - Reaper Man,
Nathan F. Yospe  Registered Looney                   by Terry Pratchett
yospe at hawaii.edu   http://www2.hawaii.edu/~yospe           Meow




More information about the MUD-Dev mailing list