Loading...
Searching...
No Matches
LibThread::CountTrigger Class Reference

## Public Member Functions

| CountTrigger (long count_init)
virtual bool | ready ()
virtual bool | accept (leftv arg)
virtual void | activate (leftv arg)
virtual void | execute ()
Public Member Functions inherited from LibThread::Trigger
| Trigger ()
Public Member Functions inherited from LibThread::Job
| Job ()
| ~Job ()
void | addDep (Job *job)
void | addDep (vector< Job * > &jobs)
void | addDep (long ndeps, Job **jobs)
void | addNotify (vector< Job * > &jobs)
void | addNotify (Job *job)
void | run ()
Public Member Functions inherited from LibThread::SharedObject
| SharedObject ()
virtual | ~SharedObject ()
void | set_type (int type_init)
int | get_type ()
void | set_name (std::string &name_init)
void | set_name (const char *s)
std::string & | get_name ()
void | incref (int by=1)
long | decref ()
long | getref ()
virtual BOOLEAN | op2 (int op, leftv res, leftv a1, leftv a2)
virtual BOOLEAN | op3 (int op, leftv res, leftv a1, leftv a2, leftv a3)

## Private Attributes

long | count

## Additional Inherited Members

Data Fields inherited from LibThread::Job
ThreadPool * | pool
long | prio
size_t | id
long | pending_index
vector< Job * > | deps
vector< Job * > | notify
vector< Trigger * > | triggers
vector< string > | args
string | result
void * | data
bool | fast
bool | done
bool | queued
bool | running
bool | cancelled

## Detailed Description

Definition at line 2029 of file shared.cc.

## Constructor & Destructor Documentation

## CountTrigger()

LibThread::CountTrigger::CountTrigger | ( | long | count_init | ) |

inline

Definition at line 2033 of file shared.cc.

: Trigger(), count(count_init) {
}
LibThread::CountTrigger::count
long count
Definition shared.cc:2031
LibThread::Trigger::Trigger
Trigger()
Definition shared.cc:1597

## Member Function Documentation

## accept()

virtual bool LibThread::CountTrigger::accept | ( | leftv | arg | ) |

inline virtual

Implements LibThread::Trigger.

Definition at line 2039 of file shared.cc.

{
return arg == NULL;
}
NULL
#define NULL
Definition omList.c:12

## activate()

virtual void LibThread::CountTrigger::activate | ( | leftv | arg | ) |

inline virtual

Implements LibThread::Trigger.

Definition at line 2042 of file shared.cc.

{
if (!ready()) {
count--;
}
}
LibThread::CountTrigger::ready
virtual bool ready()
Definition shared.cc:2035

## execute()

virtual void LibThread::CountTrigger::execute | ( |  | ) |

inline virtual

Implements LibThread::Job.

Definition at line 2047 of file shared.cc.

{
// do nothing
}

## ready()

virtual bool LibThread::CountTrigger::ready | ( |  | ) |

inline virtual

Reimplemented from LibThread::Job.

Definition at line 2035 of file shared.cc.

{
if (!Trigger::ready()) return false;
return count <= 0;
}
LibThread::Job::ready
virtual bool ready()
Definition shared.cc:1600

## Field Documentation

## count

long LibThread::CountTrigger::count

private

Definition at line 2031 of file shared.cc.

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

- Singular/dyn_modules/systhreads/shared.cc