[gameprogrammer] Re: variables and multithreading
- From: Stephen Smith <gp@xxxxxxxxxxxxxxxxxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Wed, 18 Jan 2006 19:47:30 +0000
You don't say what language you are using. If you're using Java, you
could write a function that accesses the data, and give it the
'synchronised' method modifier. Then the language will ensure that only
one thread at a time can access it.
Roger D Vargas wrote:
Im writing a multithreaded server and I have reached the point where I
have to access the array containing the players data from the main
loop. Should I use some variable to mark if a record is being modified
by network thread?
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- Follow-Ups:
- [gameprogrammer] Re: variables and multithreading
- From: Roger D Vargas
- References:
- [gameprogrammer] variables and multithreading
- From: Roger D Vargas
Other related posts:
- » [gameprogrammer] variables and multithreading
- » [gameprogrammer] Re: variables and multithreading
- » [gameprogrammer] Re: variables and multithreading
- » [gameprogrammer] Re: variables and multithreading
- » [gameprogrammer] Re: variables and multithreading
- » [gameprogrammer] Re: variables and multithreading
- » [gameprogrammer] Re: variables and multithreading
- » [gameprogrammer] Re: variables and multithreading
- » [gameprogrammer] Re: variables and multithreading
--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- [gameprogrammer] Re: variables and multithreading
- From: Roger D Vargas
- [gameprogrammer] variables and multithreading
- From: Roger D Vargas