20 lines
306 B
Plaintext
20 lines
306 B
Plaintext
include "NSLog.incl"
|
|
|
|
void local fn DoIt
|
|
LockRef m = fn LockInit
|
|
|
|
LockingLock( m )
|
|
|
|
if ( fn LockTry( m ) )
|
|
NSLog(@"lock acquired") // acquire a lock -- does not block if not acquired
|
|
else
|
|
NSLog(@"already locked, does not block")
|
|
end if
|
|
|
|
LockingUnlock( m )
|
|
end fn
|
|
|
|
fn DoIt
|
|
|
|
HandleEvents
|