How to implement out-of-order transactions in sequencer<->driver port/channel?

Hi,
Normally in driver components the code is like this.
Which means in-order execution.
forever begin
seq_item_port.get_next_item(req);

//process item ...

seq_item_port.item_done(); //will return end-of-transaction of the current sequence_item in the port.

end

However, I wanted to implement something where the item can be out-of-order, so i want to pull the sequence_item of of the channel as long there is something there and start processing the item.
However, I also want to return the end-of-transaction at some indefinite time.

I want to ask if the code snippet below will work.
I want to confirm how i can signal end-of-transaction for the sequence items that finished after pulling them out?

Thread 1:
forever begin
seq_item_port.get(req);

//process item ...

//don't signal item_done, instead another thread will signal end-of-transaction but how?

end

Thread 2:
forever begin
//wait end of transaction…

 //i think i can report event for those sequence items invoking end_event.wait_on() through
 end_tr(ref_to_sequence_item_from_sequencer);

 //how can i report event for those sequence invoking wait_for_item_done()?
 ??

end

Thanks

In reply to nazucena84:

Please exercise the code example ‘Uvm_use_models_pipelined_get_put’ from
https://verificationacademy.com/cookbook/cookbook-code-examples#UVM_Examples:#UVM_Examples:#UVM_Examples:
for more Details.

In reply to chr_sue:

Thanks, it seems that put() will unblock wait_for_item_done() calls.