+ /* got something. Take the last one out of output_queue */
+ work_this = queue_remove_last(&p->output_queue);
+ if (work_this)
+ {
+ /* put freed item in free list */
+ work_this->next = p->free_queue;
+ p->free_queue = work_this;
+
+ data = work_this->data;
+#ifdef WIN32
+ (void) recv(p->read_fd, read_buf, 1, 0);
+#else
+ (void) read(p->read_fd, read_buf, 1);
+#endif
+ }
+ yaz_mutex_leave(p->mutex);