I got an assignment on java multithreading from my university and I have some questions regarding the implementation.
I have 3 types of threads, security guard, manager, and customer.
flow:
- The customer enters the security guard's queue
- The security guard checks in his list if the customer is allowed to continue.
- if not, the security guard needs to send the customer to the manager list.
- the manager can add the customer to the security guard's list and send him back to his queue.
questions which I am not sure about:
- How can the security guard send a customer to the manager's queue?
- The manager doesn't hold the security guard's list but he may add a customer to the list, so how should he get the list?
Aucun commentaire:
Enregistrer un commentaire