[Home] [Groups] - Message: [Prev in Group] [Next in Group]

nu.kanga.list.mud-dev

22337: [MUD-Dev] Question about threads.

[Full Header] [Plain Text]
From: "Anderson, David" <david.anderson@tfp.com>
Newsgroups: nu.kanga.list.mud-dev
Date: Wed, 13 Feb 2002 13:05:05 -0600
Organization: Kanga.Nu
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@kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev