Hacker News new | past | comments | ask | show | jobs | submit login

It makes the transaction atomic.



You can do that with two locks too, but one is simpler.

Also, there is a failure mode here. Can you think of it?


Death of the person in the bathroom? Damage to the hooks causing a jam or releasing the lock entirely? Simply not engaging the lock at all? Someone walking off with the thong and using it creatively elsewhere in their hotel? A few failure scenarios. Nothing's perfect!


Death or incapacitation of the person in the bathroom is what I had in mind.

Yes, there's also the leather strap or hook (or doorknobs, ..) breaking. I hadn't considered that, oy.


I can't see what failure mode that the single lock has that isn't the same in the 2 locks version.


I often share the bathroom with my wife, and we don’t always enter at the same time. I.e. sometimes you don’t want to lock your own door.


Just thinking about this for a minute or so, I don't think there's a way of allowing /only/ one door to remain open-able ('unlocked') that solves the problem. Either both must lock/unlock in the same action or there must only be one door to the restroom (that is, duplicate the resource).


It's a different problem.


If the two people are accessing the bathroom from the same side, locks are not a problem. Three or more people sharing the bathroom is a different problem.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: