[PATCH] Thread-safe graphics manager
Maciek Gajewski
maciej.gajewski0 at gmail.com
Sat Jul 5 04:59:27 CDT 2008
Michael Goffioul wrote:
> Do you really need to add locking at all these places? Isn't it enough
> to add locking at the entry-point the user has access to, meaning the
> DEFUN_DLD functions? In any case, octave will access the graphics
> system through one of these function, right?
Yes and no. Indeed, all user interaction goes through DEFUN_DLD functions,
but:
- something may be called by function registered with input_event_hook,
- something may be called by multi-threaded backend from different thread.
Of course in both cases programmer should be aware of locking problem and lock
explicitly, but since locks came out to be cheap, I've added them whenever
they seemed useful.
Maciek Gajewski
More information about the Octave-maintainers
mailing list