astUnlock

Unlock an Object for use by other threads

Description:

Unlocks an Object previously locked using astLock, so that other threads can use the Object. See astLock for further details.

Synopsis

void astUnlock( AstObject $\ast$this, int report )

Parameters:

this
Pointer to the Object to be unlocked.
report
If non-zero, an error will be reported if the supplied Object, or any Object contained within the supplied Object, is not currently locked by the running thread. If zero, such Objects will be left unchanged, and no error will be reported.

Applicability

Object
This function applies to all Objects.

Notes:

• This function attempts to execute even if the global error status is set, but no further error report will be made if it subsequently fails under these circumstances.

• All unlocked Objects are excluded from AST context handling until they are re-locked using astLock.

• This function is only available in the C interface.

• This function returns without action if the Object is not currently locked by any thread. If it is locked by the running thread, it is unlocked. If it is locked by another thread, an error will be reported if " error" is non-zero.

• This function returns without action if the AST library has been built without POSIX thread support (i.e. the " -with-pthreads" option was not specified when running the " configure" script).