ipcILockService

IID:9f6dbe15-d851-4b00-912a-5ac0be88a409
Inherits From:nsISupports

This service provides named interprocess locking with either synchronous or asynchronous waiting.


Methods

void acquireLock ( char* lockName , ipcILockNotify notify , PRBool waitIfBusy ) void releaseLock ( char* lockName )

void acquireLock ( char* lockName , ipcILockNotify notify , PRBool waitIfBusy )

Call this method to acquire a named lock. Pass a notification handler to be notified asynchronously when the lock is acquired. Otherwise, this function will block until the lock is acquired.

Arguments:
lockName: specifies the name of the lock
notify: notification callback (NULL to synchronously acquire lock)
waitIfBusy: wait for the lock to become available; otherwise, fail if lock is already held by some other process.

void releaseLock ( char* lockName )

Call this method to release a named lock. This method can be called before OnAcquireLockComplete has been called, which will effectively cancel the request to acquire the named lock. OnAcquireLockComplete will not be called after a call to ReleaseLock.

Arguments:
lockName: specifies the name of the lock

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com