Ags.ThreadPool

g Ags.ThreadPool Ags.ThreadPool GObject.Object GObject.Object GObject.Object->Ags.ThreadPool

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (parent)

pull ()

start ()

Virtual Methods

Inherited:

GObject.Object (7)

do_start ()

Properties

Name

Type

Flags

Short Description

max-threads

int

r/w

The maximum of threads to be created

max-unused-threads

int

r/w

The maximum of unused threads

Signals

Inherited:

GObject.Object (1)

Name

Short Description

start

The ::start() signal is invoked in order to started the pool.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

create_threads

bool

r

creation_cond

GLib.Cond

r

creation_mutex

GLib.Mutex

r

flags

int

r

gobject

GObject.Object

r

idle

bool

r

idle_cond

GLib.Cond

r

idle_mutex

GLib.Mutex

r

max_threads

int

r

max_unused_threads

int

r

parent

Ags.Thread

r

queued

int

r

returnable_thread

[object]

r

thread

GLib.Thread

r

Class Details

class Ags.ThreadPool(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Ags.ThreadPoolClass

classmethod new(parent)
Parameters:

parent (Ags.Thread) – the parent Ags.Thread of returnable threads

Returns:

the new Ags.ThreadPool

Return type:

Ags.ThreadPool

Create a new Ags.ThreadPool.

New in version 3.0.0.

pull()
Returns:

a new Ags.Thread

Return type:

Ags.Thread

Pull a previously instantiated Ags.ReturnableThread. Note this function may block until a new thread is available.

New in version 3.0.0.

start()

Start the thread pool.

New in version 3.0.0.

do_start() virtual

Start the thread pool.

New in version 3.0.0.

Signal Details

Ags.ThreadPool.signals.start(thread_pool)
Signal Name:

start

Flags:

RUN_LAST

Parameters:

thread_pool (Ags.ThreadPool) – The object which received the signal

The ::start() signal is invoked in order to started the pool.

New in version 3.0.0.

Property Details

Ags.ThreadPool.props.max_threads
Name:

max-threads

Type:

int

Default Value:

1024

Flags:

READABLE, WRITABLE

The maximum amount of threads available.

New in version 3.0.0.

Ags.ThreadPool.props.max_unused_threads
Name:

max-unused-threads

Type:

int

Default Value:

8

Flags:

READABLE, WRITABLE

The maximum amount of unused threads available.

New in version 3.0.0.