 |
|
|
|
|
|
|
|
|
|
|
|
|
SVUG Community Forum
|
|
| Author |
Messages |
|
John
Posts:2
 |
| 02/04/2010 11:39 AM |
|
I am using a mailbox to communicate between my generator and agent. The generator places packets in the mailbox in a repeat() loop. The agent gets the packets in a forever loop. The mailbox is defined to be a single location. (gen2agt = new(1))
In my simulation it appears that the generator is placing data in the mailbox while the agent is getting it, and the agent appears to be getting the new data, not the original packet. It's as if the put and get consume no time and the loop gets ahead of itself, if you will.
Is this behavior expected?
I have worked around the issue by using another mailbox from the agent to the generator. The agent uses this new mailbox to "handshake" with the generator. In this way the generator has to wait until the agent says it's done with the previous packet.
My understanding of mailbox behavior was that once full they should block until a get occurs. I did not think that I needed any further "handshaking."
Any insight into this behavior would be appreciated.
John
|
|
|
|
|
DAVE
Posts:56
 |
| 02/05/2010 7:54 PM |
|
Your answer may be found in this forum http://ovmworld.org/forums/showthread.php?t=880 Dave |
|
|
|
|
John
Posts:2
 |
| 02/05/2010 8:28 PM |
|
Thanks for the link. Makes complete sense now.
John
|
|
|
|
|
|
| You are not authorized to post a reply. |
|
|
|
ActiveForums 3.7
|
|
|

|
|
|
|
|
|
|
|
|
|
 |
|