'Declaration
Sub ReleaseLock()
'Usage
Dim instance As IWorkbookSet instance.ReleaseLock()
void ReleaseLock()
'Declaration
Sub ReleaseLock()
'Usage
Dim instance As IWorkbookSet instance.ReleaseLock()
void ReleaseLock()
This method is thread safe.
Calls to GetLock may be nested. ReleaseLock must be called once for each call to GetLock.
Interruptible background calculation will be started if the following conditions are all met:
void DoSomeThreadSafeWork(IWorkbookSet workbookSet) { // Interrupt background calculation if necessary and acquire an // exclusive lock on the workbook set. workbookSet.GetLock(); try { // Do some work... } finally { // Release the lock on the workbook set and start background // calculation if appropriate. workbookSet.ReleaseLock(); } }
Sub DoSomeThreadSafeWork(ByVal workbookSet As IWorkbookSet) ' Interrupt background calculation if necessary and acquire an ' exclusive lock on the workbook set. workbookSet.GetLock() Try ' Do some work... Finally ' Release the lock on the workbook set and start background ' calculation if appropriate. workbookSet.ReleaseLock() End Try End Sub 'DoSomeThreadSafeWork
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2