Use icu_iter-functions (YAZ 4.0.2)
[pazpar2-moved-to-github.git] / src / test_sel_thread.c
index 6ec7ec8..d54059d 100644 (file)
@@ -107,7 +107,7 @@ static void test_for_real_work(int no_threads)
     YAZ_CHECK(p);
     if (p)
     {
-        iochan_man_t chan_man = iochan_man_create();
+        iochan_man_t chan_man = iochan_man_create(1 /* use_threads */);
         IOCHAN chan = iochan_create(thread_fd, iochan_handler,
                                     EVENT_INPUT|EVENT_TIMEOUT);
         iochan_settimeout(chan, 1);
@@ -116,6 +116,7 @@ static void test_for_real_work(int no_threads)
 
         iochan_man_events(chan_man);
         sel_thread_destroy(p);
+        iochan_man_destroy(&chan_man);
     }
 }