Skip to content

Commit fab7f1a

Browse files
committed
• Improved HeaderDoc of SSYSemaphore
1 parent 1e915b7 commit fab7f1a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

SSYSemaphore.h

+7-4
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,20 @@ __attribute__((visibility("default"))) @interface SSYSemaphorePidKey : NSObject
3333
SSYSemaphore features a time limit (timeLimit) to mitigate this
3434
danger.
3535
36-
SSYSemaphore is implemented by writing a process identifier (pidd) and an
37-
arbitrary user-defined key into an "info file".
36+
SSYSemaphore is implemented by writing a process identifier (pid) and an
37+
arbitrary user-defined key into an "info file" (named SSYSemaphore-Info).
3838
3939
Simultaneous access to the info file is limited to one contending process
40-
by a "lock file", as described in these links…
40+
by a "lock file" (named SSYSemaphore-Lock), as described in these links…
4141
• http://stackoverflow.com/questions/2053679/how-do-i-recover-a-semaphore-when-the-process-that-decremented-it-to-zero-crashe
42-
http://charette.no-ip.com:81/programming/2010-01-13_PosixSemaphores/index.html
42+
• http://charette.no-ip.com:81/programming/2010-01-13_PosixSemaphores/index.html
4343
Those links also explain why I use the "lock file" idea instead of named
4444
POSIX semaphores. (Briefly, named POSIX semaphores are not cleaned up by
4545
macOS if their owning processes crash, which causes a logjam until the
4646
user logs out and back in.
47+
48+
Note that the SSYSemaphore-Lock is never deleted from ~/Library/Application
49+
Support/<MotherAppName>. Don't worry about it. It contains 0 bytes.
4750
4851
When using this class, [NSApp delegate] must conform to protocol
4952
SSYAppSupporter.

0 commit comments

Comments
 (0)