In reply to cuonghle:
Keys are used together with uvm_pool which represents an assiciative arry´ay. This is different to a queue.
Please find below a link for an uvm_queue example. This does not work for 2 queues of the same type. BTW this example is nott running on VCS. Seems to be a weakness.
Maybe someboday has a good idea to resolve this issue.