Hi, Pete:
Sorry for my slow response - I have just returned from a (too short)
vacation.
Thank you for looking into this.
I think you are correct in believing that the original problem is a MINA
bug. I ran a soak test that does not involve extra threads to see
whether the IoBuffer "mark" problem could be made to occur. The answer
is yes. So it appears that there is a synchronizing problem in IoBuffer
itself. In fact, I was able to get rid of the error by avoiding
rewinding the buffer (not sure why this works, except the rewind affects
the mark).
Yigal
peter royal wrote:
On May 27, 2008, at 3:27 PM, Yigal Rachman wrote:
I asked about this in February and have managed to move ahead without
a proper solution. However, I am seeing glitches that point to
synchronizing problems, so I would greatly appreciate any help that
you could offer me. To recap: how do I synchronize the operation of
a thread external to mina so that it plays nicely with mina? In
particular, I have no idea what to synchronize *with*. My first
thought was that synchronizing with IoSession would be the thing to
do, but an inspection of the mina source code does not support this
notion.
do you need to synchronize with mina?
The client must periodically poll the instrument for its data. I am
using a repeating timer to do this.
this looks fine. whenever the timer fires, it will write a message on
the session. no need to do any additional synchronization.
looking back at your original error, it makes me think its an
underlying MINA bug if it still occurs..
-pete
--(peter.royal|osi)@pobox.com - http://fotap.org/~osi