AndroMeta  2.0.0
Static Public Member Functions
Meta::MInterrupt Class Reference

Provides a means for threads to be interrupted -- either by timeout or as interrupted by another thread. More...

#include <MInterrupt.h>

List of all members.

Static Public Member Functions

static void setTimeout (const mtime &timeout)
static void clearTimeout ()
static void setTimeout (int64_t threadId, const mtime &timeout)
static void clearTimeout (int64_t threadId)
static void interrupt (int64_t threadId)
static void clearInterrupt (int64_t threadId)
static void check ()

Detailed Description

Provides a means for threads to be interrupted -- either by timeout or as interrupted by another thread.

Allows threads to be interrupted, either by timing out or as manually interrupted by another thread. To accomplish this, a thread explicitly checks for interrupts periodically by calling check(). When an interrupt is triggered, the appropriate exception is thrown: MTimeoutError or MInterruptError.


Member Function Documentation

static void Meta::MInterrupt::check ( ) [static]

Check interrupts on the caller's thread.

static void Meta::MInterrupt::clearInterrupt ( int64_t  threadId) [static]

Clear manual interrupts on the specified thread.

static void Meta::MInterrupt::clearTimeout ( ) [static]

Clear all timeout interrupts scheduled on the caller's thread.

static void Meta::MInterrupt::clearTimeout ( int64_t  threadId) [static]

Clear all timeout interrupts scheduled for the specified thread.

static void Meta::MInterrupt::interrupt ( int64_t  threadId) [static]

Manually interrupt the specified thread.

static void Meta::MInterrupt::setTimeout ( const mtime timeout) [static]

Set a timeout interrupt on the caller's thread.

static void Meta::MInterrupt::setTimeout ( int64_t  threadId,
const mtime timeout 
) [static]

Set a timeout interrupt for the specified thread.


The documentation for this class was generated from the following file: