How to safely delete entries from a queue

In reply to smr1113:
I Think following code will work
int index_cu[$];

    foreach(ia_q[i]) begin
       index_cu = ia_q.find_first_index(i) with (i == 0x1b);
         if(index_cu.size)
         id_q.delete(index_cu[i]);
     end