but they are not used in the code. Did you try to do the same aswrite_event_valueand_queued_thread_event_availableusing callbacks when a new item is in the queue?