Apache log4cxx Version @version@

Public Member Functions | Static Public Member Functions | Friends | List of all members
Thread Class Reference

This class implements an approximation of java.util.Thread. More...

`#include <thread.h>`

## Public Member Functions
| Thread ()
| Create new instance. More...
| ~Thread ()
| Destructor. More...
void | run (Runnable start, void *data)
| Runs the specified method on a newly created thread. More...
void | join ()
bool | isActive ()
void | interrupt ()
| Sets interrupted status to true. More...
bool | isAlive ()
bool | isCurrentThread () const
void | ending ()

## Static Public Member Functions
static void | sleep (int millis)
| Causes the currently executing thread to sleep for the specified number of milliseconds. More...
static void | currentThreadInterrupt ()
| Sets interrupted status for current thread to true. More...
static bool | interrupted ()
| Tests if the current thread has been interrupted and sets the interrupted status to false. More...

## Friends
void * | ThreadLaunch::launcher (apr_thread_t *thread, void *data)

## Detailed Description

This class implements an approximation of java.util.Thread.

## Constructor & Destructor Documentation

## ◆ Thread()

Thread | ( |  | ) |

Create new instance.

## ◆ ~Thread()

~Thread | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ currentThreadInterrupt()

static void currentThreadInterrupt | ( |  | ) |
| static

Sets interrupted status for current thread to true.

## ◆ ending()

void ending | ( |  | ) |

## ◆ interrupt()

void interrupt | ( |  | ) |

Sets interrupted status to true.

## ◆ interrupted()

static bool interrupted | ( |  | ) |
| static

Tests if the current thread has been interrupted and sets the interrupted status to false.

## ◆ isActive()

bool isActive | ( |  | ) |
| inline

## ◆ isAlive()

bool isAlive | ( |  | ) |

## ◆ isCurrentThread()

bool isCurrentThread | ( |  | ) | const

## ◆ join()

void join | ( |  | ) |

## ◆ run()

void run | ( | Runnable | start,
|  | void * | data
| ) |  |

Runs the specified method on a newly created thread.

## ◆ sleep()

static void sleep | ( | int | millis | ) |
| static

Causes the currently executing thread to sleep for the specified number of milliseconds.

Parameters

  millis | milliseconds.

Exceptions

  Interrupted | Exception if the thread is interrupted.

## Friends And Related Function Documentation

## ◆ ThreadLaunch::launcher

void * ThreadLaunch::launcher | ( | apr_thread_t * | thread,
|  | void * | data
| ) |  |
| friend

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

- thread.h