[gameprogrammer] Re: variables and multithreading
- From: Roger D Vargas <luo_hei@xxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Wed, 18 Jan 2006 18:52:15 -0500
Sorry, I forgot there are more languages than C++... Im using C++ and
SDL, so I think I will use the SDL mutex system.
Stephen Smith escribió:
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
--
Roger D. Vargas
http://dsgp.blogspot.com | Linux, programación, juegos
______________________________________________
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- References:
- [gameprogrammer] variables and multithreading
- From: Roger D Vargas
- [gameprogrammer] Re: variables and multithreading
- From: Stephen Smith
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
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
-- Roger D. Vargas http://dsgp.blogspot.com | Linux, programación, juegos
--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- [gameprogrammer] variables and multithreading
- From: Roger D Vargas
- [gameprogrammer] Re: variables and multithreading
- From: Stephen Smith