[squeak-dev] Re: Ensuring canvas safety (using canvas by multiple processes)

Jason Johnson jason.johnson.081 at gmail.com
Sat Mar 15 20:13:32 UTC 2008


On Tue, Feb 12, 2008 at 9:37 AM, Michael van der Gulik
<mikevdg at gmail.com> wrote:
>
> Don't be sparing with the use of Semaphores. Correct code is better than
> fast code.

Well, the screen is a resource and IMO it's best to protect a resource
by a process, not a bunch of messy Mutex logic.  Especially something
like the screen that has to be centrally managed anyway (i.e. a window
manager).

I see that Igor made a comment below about proxies being "slow", but
the thing is, if you make a "proxy", "gate", "driver" or whatever you
want to call it, you make the DSL for how to interact with it so it
doesn't have to be slow.  If you make the driver just take OpenGL
codes and apply them then it probably will be slow, but for example X
apparently saw that Font handling was slow so they make applications
define fonts ahead of time and thereafter all font references just
pass the number/name received for this initial font setup (and I think
the font setups are read-only and can be shared behind the scenes
between unrelated applications).



More information about the Squeak-dev mailing list