wpool.h - Online Linux Manual PageSection : 3
Updated : Mon Jan 25 2021
Source : Version 4.0.0
Note : Coin
NAMEwpool.h
SYNOPSIS
#include <Inventor/C/basic.h>
#include <Inventor/C/threads/common.h>
Typedefstypedef void cc_wpool_f(void *)
Functionscc_wpool * cc_wpool_construct (int numworkers)
void cc_wpool_destruct (cc_wpool *pool)
int cc_wpool_get_num_workers (cc_wpool *pool)
void cc_wpool_set_num_workers (cc_wpool *pool, int newnum)
void cc_wpool_wait_all (cc_wpool *pool)
SbBool cc_wpool_try_begin (cc_wpool *pool, int numworkersneeded)
void cc_wpool_begin (cc_wpool *pool, int numworkersneeded)
void cc_wpool_start_worker (cc_wpool *pool, cc_wpool_f *workfunc, void *closure)
void cc_wpool_end (cc_wpool *pool)
Function Documentation
cc_wpool* cc_wpool_construct (int numworkers)Construct worker pool.
void cc_wpool_destruct (cc_wpool * pool)Destruct worker pool. Will wait for all jobs in progress to finish
int cc_wpool_get_num_workers (cc_wpool * pool)Returns the number of workers in the pool.
void cc_wpool_set_num_workers (cc_wpool * pool, int newnum)Sets the number of workers in the pool.
void cc_wpool_wait_all (cc_wpool * pool)Wait for all pool workers to finish working and go into idle state. This method should only be called by the thread controlling the pool. A pool worker should not call this method, since it will obviously never return from here (it will never go idle).
SbBool cc_wpool_try_begin (cc_wpool * pool, int numworkersneeded)Locks the pool so that workers can be started using the cc_wpool_start_worker() method. numworkersneeded should contain the minumum number of workers that is needed. If numworkersneeded workers are available, the pool will be locked and TRUE is returned. Otherwise FALSE is returned. Usage pseudocode: int numworkers = 5;
if (cc_wpool_begin(pool, numworkers)) {
for (int i = 0; i < numworkers; i++) {
cc_wpool_start_worker(my_work[i], my_closure[i]);
}
cc_wpool_end(pool);
}Important! If too few workers are available, the pool will not be locked and cc_wpool_end() should not be called. See also cc_wpool_start_worker(), cc_wpool_end()
void cc_wpool_begin (cc_wpool * pool, int numworkersneeded)Wait for numworkersneeded workers to become idle. When returning from this call, the pool will be locked, and up to numworkersneeded can be started using the cc_wpool_start_worker() method. Remember to call cc_wpool_end() to unlock the pool again. See also cc_wpool_try_begin()
void cc_wpool_start_worker (cc_wpool * pool, cc_wpool_f * workfunc, void * closure)Starts a worker. The pool must be locked (using cc_wpool_begin()) before calling this method. See also cc_wpool_begin() , cc_wpool_end()
void cc_wpool_end (cc_wpool * pool)Unlocks the pool after a cc_wpool_begin(), cc_wpool_start_worker() sequence. Please note that if cc_wpool_begin() returns 0, you should not call cc_wpool_end(). See also cc_wpool_begin(), cc_wpool_start_worker()
AuthorGenerated automatically by Doxygen for Coin from the source code. 0
Johanes Gumabo
Data Size : 17,416 byte
man-wpool.h.3coin4Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 3 / 165,066
Visitor ID : :
Visitor IP : 3.145.88.111 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.