Hello Christoph,

Christoph Schäfer wrote:
> I add some code fragments to point out whats going on. (thread a is app, 
> thread b is gui/rendering)

[SNIP - code]

hm, I did not notice anything obvious in the above code fragments. From 
my point of view it is a little unusual that the render thread requests 
the sync, I normally think about it as having a render thread that 
produces frames as fast as possible and the app thread signalling that 
it has completed an update (a frame if you will) and the render thread 
should copy over that state to show up in the next render.
Anyways, I don't think that should be a problem. However, I'm wondering 
if your program remains responsive or if one if the threads just gets 
stuck in the barriers. The way I could imagine this to happen is that if 
thread A never sees the change of the m_syncForRenderingNeeded variable. 
  Using a variable in this way to communicate between threads sometimes 
has strange effects. A popular (although from what I understand not 100% 
correct way) is to make the variable volatile (or at least the reads 
from it).
Or do you have some other debug output from both threads, so that you 
know they are both running?

        Hope it helps,
                Carsten


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to