Re:Is the Toilet Free?
by nkozyra on Monday April 21, 2014 @12:18PM
(#7621821)
Prone to race conditions, unfortunately. What's more frustrating than seeing Yes and then finding the door closing in front of you.
[ Parent
| on HN ]
Maybe they could add a reservation queue to the bathroom as new functionality. That would probably be unnecessary blocking if people abandon their place in line.
Maybe the bathroom lock could literally be a mutex.
> Maybe they could add a reservation queue to the bathroom as new functionality.
The FIFO system does not take urgency into account. When making a query, it would be good to give an urgency rating on a scale of 0 to some_number.
Re:Is the Toilet Free?
by stevewilber on Monday April 21, 2014 @01:07PM
(#7622161)
Or try to predict availability based on recent queries. If there is only one stall open and someone checked its status 30s ago, respond that "maybe" a stall is free.