|
AndroMeta
2.0.0
|
Provides a means for threads to be interrupted -- either by timeout or as interrupted by another thread. More...
#include <MInterrupt.h>
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 () |
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.
| 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.
1.7.6.1