ost::Lockfile(3)
π ost::Lockfile β from the Library Functions Manual β¨
okay bestie, sit down, we're talking about ost::Lockfile(3) today and honestly? she's that girl π
π NAME π
ost::Lockfile β this class is used to create a 'named' lock entity that can be used to control access to a resource between multiple processes. no cap. it's the bouncer at the club door of your resources π«Ά
πΈ SYNOPSIS πΈ
#include <process.h>
β¨ Public Member Functions β¨
Lockfile (const char *name)β Create a lock under a known name. πLockfile ()β Create a new lock object that can be used to make locks.~Lockfile ()β Destroy the current lock and release it. bye bestie πbool lock (const char *name)β Lock a system-wide name for this process.void unlock (void)β Release an acquired lock.bool isLocked (void)β Flag if the current process has aqcuired a lock. (yes, that's the original spelling, we don't fix, we preserve π«‘)
π¦ Detailed Description π¦
This class is used to create a 'named' lock entity that can be used to control access to a resource between multiple processes. literally her whole personality.
The posix implimentation uses a pidfile and the win32 version uses a globally visible mutex. so like, two totally different fits, same energy β¨
also. implimentation. yes. that's how it's spelled up there. we are not the spelling police, we are the detail-preservation police π
π Author π
David Sugar dyfet@ostel.com
π₯ System-wide named lock π₯
π Constructor & Destructor Documentation π
π ost::Lockfile::Lockfile (const char * name)
Create a lock under a known name. iconic behaviour honestly.
Parameters
nameof system-wide lock to create.
π ost::Lockfile::Lockfile ()
Create a new lock object that can be used to make locks. that's it. that's the whole vibe. a little blank canvas π¨
π ost::Lockfile::~Lockfile () [inline]
Destroy the current lock and release it. she's leaving, and she's taking the lock with her π
β Member Function Documentation β
π bool ost::Lockfile::isLocked (void)
Flag if the current process has aqcuired a lock.
Returns
trueif we have the lock. slay. π
π bool ost::Lockfile::lock (const char * name)
Lock a system-wide name for this process. If the lock is successful, return true. If an existing lock was already acquired, release it first. (yes bestie, she cleans up after herself before she takes the new one, we love a considerate queen π«Ά)
Returns
trueif lock successful.
Parameters
namesystem-wide lock to use.
π void ost::Lockfile::unlock (void)
Release an acquired lock. letting it go, moving on, main character energy πΈ
β¨ Author β¨
Generated automatically by Doxygen for GNU CommonC++ from the source code.
and that's the whole page, bestie!! π¦π no cap, every flag, every signature, every typo, all of it preserved with love.
this little fairy tale came to you courtesy of GNU CommonC++, dated Sun Dec 27 2020 β sending you off with a kiss and a ost::Lockfile(3) π
β¨π
π¦ where this page comes from
- ubuntu jammy: libcommoncpp2-doc 1.8.1-10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms