[Xcb] XCBSync and XCBFlush

Ian Osgood iano at quirkster.com
Wed Jun 28 07:28:21 PDT 2006


On Jun 28, 2006, at 12:15 AM, Vincent Torri wrote:

>
> Hello,
>
> XCBSync is now deprecated in xcb. So now, I need to change a bit  
> the code
> of the xcb evas engine. But how ??
>
> Now, it seems that I have 2 solutions:
>
> 1) remove XCBSync
> 2) use XCBFlush instead
>
> My questions are:
>
> 1) When is it possible to remove XCBSync. Is it only 'a posteriori' ?
> 2) If i can't remove XCBSync, is using XCBFlush always sufficient ?
> 3) Is there any good doc about the differences of these 2 functions ?
>
> thank you
>
> Vincent

Personally, I've replaced all Syncs with Flushes to no ill effect in  
my (admittedly simple) demos.  I seem to need a Flush before event  
handling or otherwise going idle.  Perhaps we should consider adding  
a flush to our Poll/WaitForEvent functions?

You might need actual Syncs in situations where the XCB connection is  
not the only communication or data channel:  before using shared  
memory images or Input Methods, for example.  Otherwise, you might  
get a race condition.

A Sync might also be required to ensure there were no errors before  
further processing.  However, I'm not sure this makes any difference  
until we get Plan 7 implemented.  (Someone should make a section on  
the XCBToDo page for Plan 7. We've been talking about it for ages,  
but I'm not entirely clear what's involved.)

Ian


More information about the Xcb mailing list