[MUD-Dev] Question about threads.

Anderson Anderson
Wed Feb 13 13:05:05 CET 2002


I joined the list a day ago or so, and ended up reading the last few
quarters of e-mails just because they were so interesting.

I had a question.. I'm writing a Java based mud (text only) somewhat
similar to Rom.  I have users able to log in, walk around see mobs,
I can edit areas, etc etc.

I was wondering about what the purpose of using threads would be,
since currently I'm in a single loop like Rom, where I process every
user in turn, and cycle through that over and over.

I haven't found sockets to ever deadlock me, as long as I set the
sotimeout (socket timeout) to 200 miliseconds.

I can think of plenty of problems by using threads (IE, the Dragon
walking through a door that just closed).  What would be the
benefits?  What are the reasons I should use threads?  And even
better, if I should use threads, what would be their purpose? One
thread per user? One thread for users, one for game updates, one for
mob updates, etc?

Thanks for all the info.
 Dave Anderson
 Software Engineer, part time World Builder.
_______________________________________________
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