Driver And Generator

Hello good evening.
the question is: I am generating 50 numbers of transaction.
and in GENERATOR class, i prepared a task, which generate this using ‘for’ loop and ‘put’ in the mail box.
In DRIVER class, i want to receive the 50 transactions and put in the queue at single instance.
Whenever i want to modify the transaction, i can easily pop_back the transaction from queue, and drive it on the interface.
Even i can use the for loop in driver class, but if i use the for loop, how can i pop_back the single transaction.

[Generator Class (task)]
virtual task start();
fork
for(int i=0; i<50;i++)
begin
dorando(); // Randomizing it in dorando() task, in p2send class object

  begin 

    gen2drv.put(p2send);   // p2send is the packet which is used to put in the mailbox.

  end
end

join
[/Generator Class (task)]

[DRIVER Class (task)]
virtual task start()

start123(); // IN this task, i am getting the data by ‘get’ method into a object and pushing it in the queue.
I want this task to be done at an instance. Soon as a single packet is generated, i want to be get in mailbox and pushed in the queue

popping(); // This task i want to use, IF i want to drive the signals on the interface.

driving(); // In this task, i have written different methods to drive the signals on the interface

endtask: start
[/DRIVER Class (task)]

Can some one please suggest the alternate method to be implemented in the DRIVER CLASS,
The objective is simple, to generate ‘n’ number of transactions and put them and get them and push them on queue, at a single instance.
And popping back from the queue, is to be done by my, according to the need.