[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.22.3 Thread exceptions

Some types of exceptions may be thrown from thread-related procedures. These exceptions can be handled by Gauche's exception mechanism (See section 6.16 Exceptions).

Builtin Class: <thread-exception>
A base class of thread-related exceptions. Inherits <exception> class. It has one slot.

Instance Variable: <thread-exception> thread
A thread that threw this exception.

Builtin Class: <join-timeout-exception>
An exception thrown by thread-join! when a timeout reaches before the waited thread returns. Inherits <thread-exception>.

Builtin Class: <abandoned-mutex-exception>
An exception thrown by mutex-lock! when a mutex to be locked is in unlocked/abandoned state. Inherits <thread-exception>. It has one additional slot.

Instance Variable: <abandoned-mutex-exception> mutex
A mutex that caused this exception.

Builtin Class: <terminated-thread-exception>
An exception thrown by thread-join! when the waited thread is terminated abnormally (by thread-terminate!). Inherits <thread-exception>. It has one additional slot.

Instance Variable: <terminated-thread-exception> terminator
A thread that terminated the thread that causes this exception.

Builtin Class: <uncaught-exception>
An exception thrown by thread-join! when the waited thread is terminated by an uncaught exception. Inherits <thread-exception>. It has one additional slot.

Instance Variable: <uncaught-exception> reason
An exception that caused the termination of the thread.

Function: join-timeout-exception? obj
Function: abandoned-mutex-exception? obj
Function: terminated-thread-exception? obj
Function: uncaught-exception? obj
[SRFI-18], [SRFI-21] These procedures checks if obj is a certain type of exception. Provided for the compatibility to SRFI-18.

Function: uncaught-exception-reason exc
[SRFI-18], [SRFI-21] Returns the value of reason slot of <uncaught-exception> object. Provided for the compatibility to SRFI-18.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Ken Dickey on November, 28 2002 using texi2html