CLIM mail archive

[Prev][Next][Index][Thread]

Updating the screen from a separate process



    Date: Fri, 28 Aug 1992 18:55 EDT
    From: abbott@aero.org

    | 
    |     I have a multi-process clim application.  The main process uses clim to
    |     interact with the user.  A second process accepts data from an external
    |     source and updates the internal data structures that the first process
    |     uses to paint the screen.
    | 
    |     Whenever the second process gets new data, I would like it to call the
    |     display-function that the first process uses.  Unfortunately, such a
    |     call is apparently incompatible with the normal call to the
    |     display-function from the first process; the screen gets completely
    |     messed up.  
    | 
    | Are you calling the pane's display function directly, or calling
    | CLIM:REDISPLAY-FRAME-PANE?  Are you using incremental redisplay?  Do
    | the two processes compete for a lock that prevents CLIM's internal
    | datastructures from getting messed up?

    I'm calling the display-function directly.

    I'm using incremental redisplay.

You definitely need to use CLIM:REDISPLAY-FRAME-PANE.  Calling the
display function directly when you are using incremental redisplay
is sure to lose.

    The two processes do not compete for a lock.  When I ran it, there was
    no overlap in when the two processes wrote to the pane.  The input
    process wrote to the pane while the main process was waiting for user
    input.  Is a lock needed in this case?  If so, the main process must
    give up the lock while it is waiting for input, so I don't understand
    how such a lock would eliminate the problem. 

Suppose both processes are trying to do output at the same time.  If
this can never happen, you're OK.  Otherwise your display function
should take a lock during the time it is doing output.

    I understand that at the recent Lisp conference you and Chris Richardson
    acknowledged that there was a problem with multiple processes and Clim.
    I assumed that this was a symptom.  Was that a wrong assumption?

	-- Russ Abbott


References:

Main Index | Thread Index