From: Alan W. I. <ir...@be...> - 2017-10-03 19:59:23
|
On 2017-10-03 12:34+0100 Phil Rosenberg wrote: > Hi Alan > I have been trying to work through your semaphore code, but I'm afraid > I just don't quite get it. > > At the heart of this bug is the fact that receiveBytes() should be > able to accept a timeout for waiting for the semaphore to unlock and > instead of being void it should return the number of bytes it actually > read. > > When I tried to implement this I just kept getting deadlocks because > I'm not really sure how it all works. Hi Phil: Because you are having trouble understanding the transmitBytes and receiveBytes design, I think the best thing to do is for me to look closely at the deadlock scenario you have described previously to see if the current design answers it. And if it doesn't, I will modify transmitBytes and receiveBytes appropriately. But this all will take some substantial time on my part because I have other PLplot issues (such as the cross-talk between streams that some interactive devices show for example 14) on my plate right now. Meanwhile, you did say you had some sort of fix for locate mode which you (much earlier in the recent discussions between us) described as > I have made a quick couple of changes that makes locate work correctly > again with wxWidgets by simply halting checking for new data while > doing a locate, then starting again when locate is complete. But you were reluctant to push those changes at that time, and I don't think you have done so since. If these changes do not involve the introduction of timed waits or modifications to transmitBytes and receiveBytes is there any reason to not push them? But if they do involve such changes (e.g., to work around the deadlock you think is there), then please don't push them and send me the patch instead to help educate me about that issue. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |