Ags.Thread¶
- Subclasses:
 
Methods¶
- Inherited:
 - Structs:
 
class  | 
|
class  | 
  | 
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
- Inherited:
 
  | 
|
  | 
|
  | 
|
  | 
Properties¶
Name  | 
Type  | 
Flags  | 
Short Description  | 
|---|---|---|---|
r/w  | 
The delay until next tic  | 
||
r/w  | 
frequency as JIFFIE  | 
||
r/w  | 
The max precision as JIFFIE  | 
Signals¶
- Inherited:
 
Name  | 
Short Description  | 
|---|---|
The   | 
|
The   | 
|
The   | 
|
The   | 
|
The   | 
Fields¶
- Inherited:
 
Class Details¶
- class Ags.Thread(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
- classmethod global_get_use_sync_counter()¶
 - 
Get global config value use sync counter.
New in version 3.0.0.
 
- classmethod new()¶
 - Returns:
 the new
Ags.Thread- Return type:
 
Create a new instance of
Ags.Thread.New in version 3.0.0.
- classmethod self()¶
 - Returns:
 the running
Ags.Thread- Return type:
 
Thread self.
New in version 3.0.0.
- add_child(child)¶
 - Parameters:
 child (
Ags.Thread) – the child to remove
Add child to thread.
New in version 3.0.0.
- add_child_extended(child, no_start, no_wait)¶
 - Parameters:
 child (
Ags.Thread) – the child to removeno_start (
bool) – don’t start threadno_wait (
bool) – don’t wait until started
Add child to thread.
New in version 3.0.0.
- add_start_queue(child)¶
 - Parameters:
 child (
Ags.Thread) – the childAgs.Threadto start
Add child to self's start queue.
New in version 3.0.0.
- add_start_queue_all(child)¶
 - Parameters:
 child ([
Ags.Thread]) – the children asGLib.List-struct containingAgs.Threadto start
Add child to self's start queue.
New in version 3.0.0.
- children()¶
 - Returns:
 the children
Ags.Thread- Return type:
 
Get children thread.
New in version 3.0.0.
- clear_status_flags()¶
 Clear status flags.
New in version 3.0.0.
- clear_sync_tic_flags()¶
 Clear sync-tic flags.
New in version 3.0.0.
- clock()¶
 - Returns:
 the cycles to be performed
- Return type:
 
Clock the thread.
New in version 3.0.0.
- find_type(gtype)¶
 - Parameters:
 gtype (
GObject.GType) – theGObject.GType-struct- Returns:
 the matching
Ags.Thread- Return type:
 
Find gtype as descendant of self. If its a descendant thread, the ref-count is increased.
New in version 3.0.0.
- first()¶
 - Returns:
 the very first
Ags.Threadwithin same tree level- Return type:
 
Retrieve first sibling.
New in version 3.0.0.
- get_current_sync_tic()¶
 - Returns:
 the current sync-tic
- Return type:
 
Get current sync-tic.
New in version 3.0.0.
- get_max_precision()¶
 - Returns:
 the max-precision
- Return type:
 
Get max-precision.
New in version 3.0.0.
- get_toplevel()¶
 - Returns:
 the toplevevel
Ags.Thread- Return type:
 
Retrieve toplevel thread.
New in version 3.0.0.
- last()¶
 - Returns:
 the very last AgsThread within same tree level
- Return type:
 
Retrieve last sibling.
New in version 3.0.0.
- lock()¶
 Locks the threads own mutex and sets the appropriate flag.
New in version 3.0.0.
- next()¶
 - Returns:
 the next
Ags.Thread- Return type:
 
Get next thread.
New in version 3.0.0.
- parent()¶
 - Returns:
 the parent
Ags.Thread- Return type:
 
Get parent thread.
New in version 3.0.0.
- prev()¶
 - Returns:
 the prev
Ags.Thread- Return type:
 
Get prev thread.
New in version 3.0.0.
- recover_dead_lock()¶
 Recover dead-lock of the thread.
New in version 7.1.0.
- remove_child(child)¶
 - Parameters:
 child (
Ags.Thread) – the child to remove
Remove child of thread.
New in version 3.0.0.
- run()¶
 Only for internal use of ags_thread_loop but you may want to set the your very own class function namely your thread’s routine.
New in version 3.0.0.
- set_current_sync_tic(current_sync_tic)¶
 - Parameters:
 current_sync_tic (
int) – the current sync-tic
Set current sync-tic.
New in version 3.0.0.
- set_flags(flags)¶
 - Parameters:
 flags (
Ags.ThreadFlags) – the flags
Set flags.
New in version 3.0.0.
- set_frequency(frequency)¶
 - Parameters:
 frequency (
float) – the frequency
Set frequency.
New in version 3.0.0.
- set_max_precision(max_precision)¶
 - Parameters:
 max_precision (
float) – the max-precision
Set max-precision.
New in version 3.0.0.
- set_status_flags(status_flags)¶
 - Parameters:
 status_flags (
Ags.ThreadStatusFlags) – the status flags
Set status flags.
New in version 3.0.0.
- set_sync_tic_flags(sync_tic_flags)¶
 - Parameters:
 sync_tic_flags (
Ags.ThreadSyncTicFlags) – the sync-tic flags
Set sync-tic flags.
New in version 3.0.0.
- start()¶
 Start the thread.
New in version 3.0.0.
- stop()¶
 Stop the threads loop by unsetting
Ags.ThreadStatusFlags.THREAD_STATUS_RUNNINGflag.New in version 3.0.0.
- test_flags(flags)¶
 - Parameters:
 flags (
Ags.ThreadFlags) – the flags- Returns:
 - Return type:
 
Test flags to be set on self.
New in version 3.0.0.
- test_status_flags(status_flags)¶
 - Parameters:
 status_flags (
Ags.ThreadStatusFlags) – the status flags- Returns:
 - Return type:
 
Test status_flags to be set on self.
New in version 3.0.0.
- test_sync_tic_flags(sync_tic_flags)¶
 - Parameters:
 sync_tic_flags (
Ags.ThreadSyncTicFlags) – the sync-tic flags- Returns:
 - Return type:
 
Test sync_tic_flags to be set on self.
New in version 3.0.0.
- trylock()¶
 - 
Locks the threads own mutex if available and sets the appropriate flag and returning
True. Otherwise returnFalsewithout lock.New in version 3.0.0.
 
- unlock()¶
 Unlocks the threads own mutex and unsets the appropriate flag.
New in version 3.0.0.
- unset_flags(flags)¶
 - Parameters:
 flags (
Ags.ThreadFlags) – the flags
Unset flags.
New in version 3.0.0.
- unset_status_flags(status_flags)¶
 - Parameters:
 status_flags (
Ags.ThreadStatusFlags) – the status flags
Unset status flags.
New in version 3.0.0.
- unset_sync_tic_flags(sync_tic_flags)¶
 - Parameters:
 sync_tic_flags (
Ags.ThreadSyncTicFlags) – the sync-tic flags
Unset sync-tic flags.
New in version 3.0.0.
- do_clock() virtual¶
 - Returns:
 the cycles to be performed
- Return type:
 
Clock the thread.
New in version 3.0.0.
- do_recover_dead_lock() virtual¶
 Recover dead-lock of the thread.
New in version 7.1.0.
- do_run() virtual¶
 Only for internal use of ags_thread_loop but you may want to set the your very own class function namely your thread’s routine.
New in version 3.0.0.
- do_start() virtual¶
 Start the thread.
New in version 3.0.0.
- do_stop() virtual¶
 Stop the threads loop by unsetting
Ags.ThreadStatusFlags.THREAD_STATUS_RUNNINGflag.New in version 3.0.0.
Signal Details¶
- Ags.Thread.signals.clock(thread)¶
 - Signal Name:
 clock- Flags:
 - Parameters:
 thread (
Ags.Thread) – The object which received the signal- Returns:
 the number of cycles to perform
- Return type:
 
The
::clock() signal is invoked every thread tic.New in version 3.0.0.
- Ags.Thread.signals.recover_dead_lock(thread)¶
 - Signal Name:
 recover-dead-lock- Flags:
 - Parameters:
 thread (
Ags.Thread) – The object which received the signal
The
::recover-dead-lock() signal is invoked as thread needs to recover dead-lock.New in version 7.1.0.
- Ags.Thread.signals.run(thread)¶
 - Signal Name:
 run- Flags:
 - Parameters:
 thread (
Ags.Thread) – The object which received the signal
The
::run() signal is invoked during run loop.New in version 3.0.0.
- Ags.Thread.signals.start(thread)¶
 - Signal Name:
 start- Flags:
 - Parameters:
 thread (
Ags.Thread) – The object which received the signal
The
::start() signal is invoked as thread started.New in version 3.0.0.
- Ags.Thread.signals.stop(thread)¶
 - Signal Name:
 stop- Flags:
 - Parameters:
 thread (
Ags.Thread) – The object which received the signal
The
::stop() signal is invoked as thread stopped.New in version 3.0.0.
Property Details¶
- Ags.Thread.props.delay¶
 - 
The delay until next tic.
New in version 3.0.0.
 
- Ags.Thread.props.frequency¶
 - 
The frequency to run at in Hz.
New in version 3.0.0.