Change iqueue_t impl. to remove possible race