An AST is an OpenVMS mechanism for reporting an
asynchronous event to a process. The following are restrictions
concerning the use of ASTs with DECthreads:
- Avoid blocking ASTs using any mechanism other than
$SETAST.
- Be aware that blocking ASTs in one thread may prevent
delivery of ASTs which are actually intended for other threads.
Therefore, it is best to avoid blocking ASTs for an extended
period of time. Also, it is best to avoid calling DECthreads
functions which may block the thread while it has disabled ASTs.
- Do not call DECthreads routines, except those that have
the _int (interrupt) suffix in their names, from within an AST
routine. Calling any other DECthreads routines from code running
in an AST can be unreliable or cause unexpected behavior.
- For OpenVMS Alpha, ASTs are handed off to DECthreads by
the operating system. This allows ASTs to be delivered in the
context of the appropriate thread. On a multiprocessor machine
it may be possible to have a thread executing an AST routine
in parallel with another thread's execution. When a thread
disables ASTs, not only does it block out its own ASTs, but it
prevents delivery of any ASTs that do not specifically belong to
a particular thread as well.