17 #ifndef _DECAF_LANG_THREAD_H_ 18 #define _DECAF_LANG_THREAD_H_ 31 namespace concurrent {
38 class ThreadProperties;
70 ThreadProperties* properties;
75 static const int MIN_PRIORITY = 1;
78 static const int NORM_PRIORITY = 5;
81 static const int MAX_PRIORITY = 10;
129 virtual void uncaughtException(
const Thread* thread,
const Throwable& error) = 0;
167 Thread(
const std::string& name);
200 Thread(
Runnable* task,
const std::string& name,
long long stackSize);
212 virtual void start();
233 virtual void join(
long long millisecs);
247 virtual void join(
long long millisecs,
int nanos);
260 long long getId()
const;
266 std::string getName()
const;
273 void setName(
const std::string& name);
280 int getPriority()
const;
290 void setPriority(
int value);
312 std::string toString()
const;
320 bool isAlive()
const;
348 bool isInterrupted()
const;
364 static void sleep(
long long millisecs);
381 static void sleep(
long long millisecs,
int nanos);
394 static Thread* currentThread();
403 static bool interrupted();
429 void initializeSelf(
Runnable* task,
const std::string& name,
long long stackSize);
This class represents an error that has occurred.
Definition: Throwable.h:44
virtual ~UncaughtExceptionHandler()
Definition: Thread.h:121
Interface for handlers invoked when a Thread abruptly terminates due to an uncaught exception...
Definition: Thread.h:118
A Thread is a concurrent unit of execution.
Definition: Thread.h:64
#define DECAF_API
Definition: Config.h:29
Interface for a runnable object - defines a task that can be run by a thread.
Definition: Runnable.h:29
Definition: Threading.h:36
Definition: ThreadGroup.h:30
State
Represents the various states that the Thread can be in during its lifetime.
Definition: Thread.h:84
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25
Definition: ThreadingTypes.h:62