Xfce Foundation Classes
Main Page | Index | Namespace List | Alphabetical List | Class List | File List

# thread.hh File Reference

A GThread C++ wrapper interface. More...

`#include <xfc/glib/mutex.hh>`
`#include <xfc/glib/timeval.hh>`
`#include <sigc++/sigc++.h>`
`#include <xfc/glib/inline/thread.inl>`

## Namespaces

- namespace Xfc
- namespace Xfc::G

## Classes

- class Xfc::G::Thread
    A GThread C++ wrapper interface. More...
- class Xfc::G::Condition
    A GCond C++ wrapper interface. More...
- struct Xfc::G::StaticPrivate< T >
    A compile-time GStaticPrivate C++ wrapper interface. More...
- class Xfc::G::Private< T >
    A run-time GStaticPrivate C++ wrapper interface. More...

## Defines

- #define XFC_STATIC_PRIVATE_INIT { G_STATIC_PRIVATE_INIT }
    Macro that initializes a StaticPrivate.

## Enumerations

- enum ThreadError { THREAD_ERROR_AGAIN = G_THREAD_ERROR_AGAIN }
    Specifies the possible errors for thread related methods. More...
- enum ThreadPriority {
  THREAD_PRIORITY_LOW = G_THREAD_PRIORITY_LOW,
  THREAD_PRIORITY_NORMAL = G_THREAD_PRIORITY_NORMAL,
  THREAD_PRIORITY_HIGH = G_THREAD_PRIORITY_HIGH,
  THREAD_PRIORITY_URGENT = G_THREAD_PRIORITY_URGENT
  }
    Specifies the priority of a thread. More...

## Detailed Description

A GThread C++ wrapper interface.

Provides a thread abstraction; including threads, different mutexes, conditions and thread private data.

## Define Documentation

#define XFC_STATIC_PRIVATE_INIT { G_STATIC_PRIVATE_INIT }

| Macro that initializes a StaticPrivate. A StaticPrivate must be initialized with this macro, before it can be used. This macro can used be to initialize a variable, but it cannot be assigned to a variable. If you want to allocate a run-time private key use G::Private instead.

## Enumeration Type Documentation

enum ThreadError

Specifies the possible errors for thread related methods.

Enumeration values:

  THREAD_ERROR_AGAIN | The resource temporarily unavailable.

enum ThreadPriority

Specifies the priority of a thread.

It is not guaranteed, that threads with different priorities really behave accordingly. On some systems (e.g. Linux) only root can increase priorities. On other systems (e.g. Solaris) there doesn't seem to be different scheduling for different priorities. All in all try to avoid being dependent on priorities.

Enumeration values:

  THREAD_PRIORITY_LOW | A priority lower than normal.
  THREAD_PRIORITY_NORMAL | The default priority.
  THREAD_PRIORITY_HIGH | A priority higher than normal.
  THREAD_PRIORITY_URGENT | The highest priority.

Xfce Foundation Classes

Copyright © 2004-2005 The XFC Development Team | XFC 4.3