A quick solution that might work is to have a member in the struct 'locked' that you set to true before the factor writes and set to false when it has finished. Then in c, write the equivalent of
While (not struct.locked) { } Before you read from the struct. Because your read/write pattern is simple, this could work fine. In more complicated situations, locks can cause a lot of headaches. Good luck ! On Sep 14, 2011 10:38 PM, "Patrick Mc(avery" <patr...@spellingbeewinnars.org> wrote: On 11-09-14 04:20 PM, Marmaduke Woodman wrote: > > Hi > > I just joined this list, and being new to ... Hi Marmaduke I think your point is very valid and I am worried about it. The struct would be written to by factor only and read by the daemon only but I don't know what will happen if the daemon reads half way through a factor write. I would like to learn more about shared state. Thanks ------------------------------------------------------------------------------ BlackBerry® DevC...
------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerry® mobile platform with sessions, labs & more. See new tools and technologies. Register for BlackBerry® DevCon today! http://p.sf.net/sfu/rim-devcon-copy1
_______________________________________________ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk