My Project
Loading...
Searching...
No Matches
LibThread::ProcJob Class Reference

Public Member Functions

 ProcJob (const char *procname_init)
 
virtual void execute ()
 
- 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)
 
virtual bool ready ()
 
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

string procname
 

Additional Inherited Members

- Data Fields inherited from LibThread::Job
ThreadPoolpool
 
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 2376 of file shared.cc.

Constructor & Destructor Documentation

◆ ProcJob()

LibThread::ProcJob::ProcJob ( const char * procname_init)
inline

Definition at line 2379 of file shared.cc.

2379 : Job(),
2380 procname(procname_init) {
2381 set_name(procname_init);
2382 }
void set_name(std::string &name_init)
Definition shared.cc:160

Member Function Documentation

◆ execute()

virtual void LibThread::ProcJob::execute ( )
inlinevirtual

Implements LibThread::Job.

Definition at line 2383 of file shared.cc.

2383 {
2384 vector<leftv> argv;
2385 for (unsigned i = 0; i <args.size(); i++) {
2386 appendArg(argv, args[i]);
2387 }
2388 for (unsigned i = 0; i < deps.size(); i++) {
2389 appendArg(argv, deps[i]->result);
2390 }
2391 sleftv val;
2392 int error = executeProc(val, procname.c_str(), argv);
2393 if (!error) {
2394 result = (LinTree::to_string(&val));
2395 val.CleanUp();
2396 }
2397 }
int i
Definition cfEzgcd.cc:132
vector< string > args
Definition shared.cc:1553
vector< Job * > deps
Definition shared.cc:1550
string result
Definition shared.cc:1554
void CleanUp(ring r=currRing)
Definition subexpr.cc:351
#define error(a)
static void appendArg(vector< leftv > &argv, string &s)
Definition shared.cc:723
static BOOLEAN executeProc(sleftv &result, const char *procname, const vector< leftv > &argv)
Definition shared.cc:744
std::string to_string(leftv val)
Definition lintree.cc:843

Field Documentation

◆ procname

string LibThread::ProcJob::procname
private

Definition at line 2377 of file shared.cc.


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