Re: Cocoa really needs to be thread-safe
Re: Cocoa really needs to be thread-safe
- Subject: Re: Cocoa really needs to be thread-safe
- From: Andy Lee <email@hidden>
- Date: Tue, 5 Nov 2002 00:19:27 -0500
At 7:03 PM -0800 11/4/02, James DiPalma wrote:
Interesting point and a long standing irritation for me.
Me too.
When a button is depressed (user is holding mouseDown -- as if
gravity didn't work), NSButton blocks waiting for a mouseUp event
and will also check if the mouse leaves its bounds. I don't think
NSButton must block to provide what little functionality it provides
during mouseDown:, but NSButton always has blocked.
Many if not all of cocoa's widgets block (or simply wait for
nextEventMatchingMask:) to return a mouse-up event during mouse
down. I'm surprised anyone actually noticed.
This is one of the *first* things I noticed about OS X. I think I
first noticed it with a scroll bar while multiple browser windows
were busy drawing themselves. The windows would stop drawing while I
had the mouse down. I was pretty embarrassed by this, since I had
assumed OS X's UI would be at least as smoothly multithreaded as
Windows. It looked like widgets were handling mouse-downs inside a
blocking loop, which is *so* OS 9.
--Andy
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.