[haiku-bugs] Re: [Haiku] #4260: [ScreenSaver] freezes when switching screensavers

  • From: "jscipione" <trac@xxxxxxxxxxxx>
  • Date: Fri, 15 Nov 2013 23:45:47 -0000

#4260: [ScreenSaver] freezes when switching screensavers
   Reporter:  diver                    |      Owner:  axeld
       Type:  bug                      |     Status:  reopened
   Priority:  normal                   |  Milestone:  R1
  Component:  Preferences/ScreenSaver  |    Version:  R1/Development
 Resolution:                           |   Keywords:
 Blocked By:                           |   Blocking:  10125
Has a Patch:  0                        |   Platform:  All

Comment (by jscipione):

 With the new understanding I've come to have, please disregard the above
 idea. I realize now this crash is probably caused by the view being
 deleted before being passed to the Draw() method of the screensaver and
 has nothing to do with locking.

 I had previously experimented with passing a message from the runner
 thread back to the window thread, via a handler passed into the
 constructor and having the window thread do the drawing instead so that
 the runner thread would not have to lock the window before drawing or even
 be aware of the windows existence in order to prevent locking issues.

 But, firstly, lock contention wasn't a problem here anyway, and secondly I
 don't want to do the drawing in the window thread because that thread
 needs to be free to do other things like receive mouse and keyboard input
 and draw other things while the runner thread is drawing the screensaver.

Ticket URL: <http://dev.haiku-os.org/ticket/4260#comment:18>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: