PreviousUpNext

15.3.400  src/lib/src/lib/thread-kit/src/lib/thread-deathwatch.api

## thread-deathwatch.api
#
# Detect and report unexpected thread terminations.
#
# See also:
#     src/lib/src/lib/thread-kit/src/lib/logger.api
#     src/lib/src/lib/thread-kit/src/lib/uncaught-exception-reporting.api

# Compiled by:
#     src/lib/std/standard.lib

stipulate
    package fil =  file__premicrothread;        # file__premicrothread          is from   src/lib/std/src/posix/file--premicrothread.pkg
    package thk =  threadkit;                   # threadkit                     is from   src/lib/src/lib/thread-kit/src/core-thread-kit/threadkit.pkg
herein

    api Thread_Deathwatch {
        #
        logging:  fil::Logtree_Node;            # Controls printing of thread watching messages.

        start_thread_deathwatch                 # Watch the given thread for unexpected termination.
            :
            ( String,                           # Name of thread. This is for human consumption only -- not used algorithmically.
              thk::Microthread                  # Id of thread to watch.
            )
            ->
            Void;

        stop_thread_deathwatch                  # Stop watching the given thread.
            :
            thk::Microthread
            ->
            Void;
    };
end;


## COPYRIGHT (c) 1992 AT&T Bell Laboratories
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext