I know this is essentially a synchronization problem and can probably be done with a global flag of some kind that's protected with a mutex. But I'm wondering if anyone has encountered an existing library of sorts that might be able to handle this functionality. This problem seems like a common one, but from preliminary research I cannot find an existing post/solution that explicitly handles my needs.
I want users, after they login to my website, to be able to lock a specific webpage that handles some configurations so that nobody else can make changes to the configurations on that page while the other user is making changes. I would like the user to be able to unlock the page when they're done making changes, and have some kind of admin override so an admin user can unlock a locked page.
Has anyone seen a library that handles this functionality, or had to implement something like this themselves? I would appreciate any insights.