Index: [thread] [date] [subject] [author]
  From: becka@rz.uni-duesseldorf.de
  To  : ggi-develop@eskimo.com
  Date: Sun, 13 Sep 1998 22:28:48 +0200 (MEST)

Re: SYNC mode should go

Hi !

> > > This does not save you the locking for all targets.
> All of LibGGI is supposed to be thread-safe.  This is no different from
> calling LibGGI functions in separate threads together.
> Flushing on signals is a losing position, if someone wants to do it, let
> him/her implement the signal mask stuff himself/herself.

What is the big difference ?
If we do proper locking and abstract it, we should be able to make a lock
mechanism for threads as well as one for signals - or ?

>   When the drawing command returns, it is already or will be
>   executed very shortly. So the visible effect is that everything is
>   drawn immediately.  (It is not guaranteed in the strict sense that it
>   is already drawn when the function call returns, but almost.)
> 
> Flushing 20 times per sec from a separate thread,process,signals does not
> guarantee this, nor should we (at least in theory) fool the application that
> it is.  In other words, don't try to emulate it if it is not possible. 

Why doesn't it ? It ensures the screen gets updated at about max 50ms
after the command complets - what's wrong with that ?

> (Note that X-lib target's SYNC mode is still alright, because in fact it
> does synchronize after each operation.)

I think we need to set some definitions straight :

SYNC mode (as in LibGGI) is there to give the application the "feel" like 
it would be running on DOS or something where you have direct HW access.
The idea is, that applications ported from there do not need a lot of
effort. Note that you often have to port foreign code. Ask Wouter about
Descent ...

SYNC mode is there to avoid waiting for keystrokes while the menu is not yet
drawn etc.

What I call SYNC mode here is fundamentally different from what X calls
SYNC.

And BTW: There are quite some shortcomings of ASYNC mode ...
Try it under the X target. As LibGGI has no notion of an "Event-Loop"
or something, an ASYNC application will not update correctly after
it has been hidden by some other window.

CU,Andy

-- 
= Andreas Beck                    |  Email :  <andreas.beck@ggi-project.org> =

Index: [thread] [date] [subject] [author]