LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How to use threads in Java for a MuliServer & some Clients. Readers & Writers problem (https://www.linuxquestions.org/questions/programming-9/how-to-use-threads-in-java-for-a-muliserver-and-some-clients-readers-and-writers-problem-537417/)

manolakis 03-14-2007 10:20 AM

How to use threads in Java for a MuliServer & some Clients. Readers & Writers problem
 
Hey there

I have a Client, a Server, a GUI and some other java classes. I want each client being able to pass input to the GUI and then the GUI to store that into a text file. Now the server or better the multi-server should only have a copy of the Store class.
The problem is also based upon Readers & Writers because it could come up possible that when having more than 1 client active in them same time one of these clients could attemp to write to a file that another client could be reading that time.
Will be obliged if anyone had any idea of how to do that.

Thanks for your time


All times are GMT -5. The time now is 05:11 PM.