>
> It is good that you are doing some critical thinking about my bytes
> transmission logic this way.  However, it appears you are referring to
> the case where there are two separate but simultaneous uses of IPC
> (one to send an array of data from core to viewer and one to send an
> array of data from viewer to core).

Hi Alan
Actually I am talking about the opposite case. Both core and viewer
make a receive request. In both cases the receiveBytes function will
not return until the data is received, but the other party can never
send it because it is also sat in the receiveBytes function.

Here what happens is the core sends a locate command and calls
receiveBytes waiting for a response.

The viewer receives the locate command and flags this so that we
capture the next mouse click, however before that happens the timer
triggers the viewer to check for some more data, it calls receiveBytes
then sits waiting for data. But of course the core won't send any data
until it has received the locate data.

The result is deadlock and the viewer hangs.

The proper fix should be that there is an option in receiveBytes to
return immediately if there is no data to grab. This option should
always be used by the viewer to avoid both this kind of deadlock, but
also to avoid hangs when the core is very busy - don't forget that the
user program might be doing some very intense stuff in between
plotting commands.

Phil

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to