[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-video-dev
Subject:    Re: [hxvideo] xlib & threading
From:       Vikram Dendi <vdendi () real ! com>
Date:       2003-09-16 21:32:48
Message-ID: 3F678180.2080900 () real ! com
[Download RAW message or body]

This is the PR that needs to be fixed if I am not wrong
https://helix-dna.helixcommunity.org/issues/show_bug.cgi?id=576


Ryan Gammon wrote:

> I was talking to Bob Clark, and he mentioned that the Mac team deals 
> with this issue with a Mac-specific threading mechanism, which keeps 
> the blting in the same thread as the rest of the gui.
>
> It sounds like there are some things in our threading library that 
> could be used to do something similar in unix. Alternatively, we could 
> schedule a callback that would do the XShmPutImage call from the main 
> thread.
>
> So, to summarize, there are at least 4 ways to solve this problem:
> 1. Implement display-level locking, with the xlib calls, gtk calls, or 
> otherwise
> 2. Move CHXUnixSite::UnixEventHandler::Func() into the pacemaker thread
> 3. Blit from the main loop like the mac guys (using some sort of 
> threading)
> 4. Blit from the main loop from the scheduler
>
> I like 2, but I haven't looked at how easy it'd be to implement.
>
>
> Ryan Gammon wrote:
>
>> I'm still having occasional threading problems with xlib.
>>
>> Another set of call stacks are attached. In this case, XPending 
>> (dpy=0x80fbe00) and
>> XShmPutImage (dpy=0x80fbe00) are to blame.
>>
>> As I understand it, if I do a Create instead of an AttachWindow, the 
>> core schedules XNextEvent calls for the main thread (instead of the 
>> XPending call above).
>>
>> There are paths in XNextEvent that result in _XFlush being called, so 
>> I don't think this is necessarily safe to do either.
>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@video.helixcommunity.org
For additional commands, e-mail: dev-help@video.helixcommunity.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic