The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
March 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

threads

Posted by wed on March 14, 2001 at 1:02 AM

i have a question about multithreading. there are 2 actions, one to read, and the other to write. when it is to read, many read threads can go to this memory area at same time; there are also many write threads, but only one is allowed at a time to access this area. how do i setup the threads? If i setup this common memory as the monitor, and use synchranize key work to allow only one write thread at time, what about read action as i cannot use synchranize key word for this action. and also, if there are some read threads is reading, and then a write thread arrives, what do i do? thank you



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us