27 #include <yaz/xmalloc.h>
64 static int number = 0;
76 YAZ_CHECK_EQ(work->
x * 2, work->
y);
89 work = xmalloc(
sizeof(*work));
93 work = xmalloc(
sizeof(*work));
106 &thread_fd, no_threads);
123 int main(
int argc,
char **argv)
125 YAZ_CHECK_INIT(argc, argv);
void iochan_man_events(iochan_man_t man)
void iochan_man_destroy(iochan_man_t *mp)
IOCHAN iochan_create(int fd, IOC_CALLBACK cb, int flags, const char *name)
iochan_man_t iochan_man_create(int no_threads, int max_sockets)
void iochan_destroy(IOCHAN chan)
int iochan_add(iochan_man_t man, IOCHAN chan, int slack)
#define iochan_settimeout(i, t)
#define iochan_getdata(i)
#define iochan_setdata(i, d)
void * sel_thread_result(sel_thread_t p)
gets result of work
void sel_thread_add(sel_thread_t p, void *data)
adds work to be carried out in thread
sel_thread_t sel_thread_create(void(*work_handler)(void *work_data), void(*work_destroy)(void *work_data), int *read_fd, int no_of_threads)
creates select thread
void sel_thread_destroy(sel_thread_t p)
destorys select thread
stuff we work on in separate thread
static void work_handler(void *vp)
work to be carried out in separate thrad
static void test_create_destroy(void)
see if we can create and destroy without problems
int main(int argc, char **argv)
static void work_destroy(void *vp)
how work is destructed
static void test_for_real_work(int no_threads)
void iochan_handler(struct iochan *i, int event)