but the movement of persons must not be predictable in any way (neither the start time nor the order), and the use of threads is required.
the movement of persons must not be predictable in any way
Norm Radder wrote:I don't know what advantages there would be to using more than one thread for this project. Threads are a way to do two or more things on a computer at the same time. The number of things that can be done simultaneously is limited by the number of CPUs your computer has.
Piet Souris wrote:
So, could we not also have a 2D array of Locks? For instance, that Person at (0, 0) could try to obtain a lock on field (0, 3), and if succesful, just move to (0, 1). Person (100, 100) can do the same. That means that usually more than one Person can move.