... until I re-read the instructions about locking
"Any attempt to lock a resource that is already locked should cause the current
thread to give up the CPU, consuming no CPU cycles until the desired resource becomes available. "
After spending some hours reading all these topics about locking I'm confused.
Here is my workflow by booking a room:
- establish a rmi connection to the server
- client calls the lock method in the server:
[edit] do not provide complete actual code snippets
- client receives the cookie and calls update ()
- client calls unlock:
[edit] do not provide complete actual code snippets
Now I'm wondering whether I choosed a too easy (and maybe wrong) way?
Do I have to create Threads for every client by my own?
Regards
Benne