June 2001
Intermediate to advanced
688 pages
19h 18m
English
#include <db.h> int db_env_set_func_yield(int (*func_yield)(void));
The Berkeley DB library requires the ability to yield the processor from the current thread of control to any other waiting threads of control. The func_yield argument must conform to the following interface:
int yield(void);
The func_yield function must be able to cause the rescheduling of all participants in the current Berkeley DB environment, whether threaded or not. It may be incorrect to supply a thread yield function if more than a single process is operating in the Berkeley DB environment. This is because many thread-yield functions will not allow other processes to run, and the contested lock may be held by another process, not ...