Ok, I have to comment since i'm up to my neck with alligators over  
performSelectorOnMainThread: In fact just this evening 4 hours toasted  
to document a bug with this call with Apple for tomorrow.

(a) people don't realize with the carbon os-x vm we run on the Main  
Thread and poll for os-x events that then get dispatch to the squeak  
vm event handlers.
This leads to the interesting jerky non-responsive feedback you get  
with the VM when you accidently kill the morphic polling loop, since  
we aren't servicing
the UI event polling fast enough since we are using a fallback 1/2  
second ancient  piece of code that in the past looked for the  
interrupt key.

(b) If you use the Unix os-x vm, that spins the squeak thread off as a  
background task, now if you do UI related work via FFI then you die.

(c) performSelectorOnMainThread: has lots of interesting bugs on the  
iPhone, especially if you try to do view animation with it.

(d) the iphone vm runs as a background thread, but deadlocks with  
UIWebView between it and the main thread, are interesting, all  
solvable, but interesting. Fortunately in the future we can migrate  
back to (a) on the iPhone.

(e) if you run on the Main Thread then you need something to handle  
event callbacks from the UI when you call the UI to service a UI  
event.  Fortunately this has been worked out and is easier than (d)

Frankly (a), (b), (c) and did I mention (d) are serious complications  
I could do without.

On 22-Apr-09, at 9:17 PM, Eagle Offshore wrote:

>
> On Apr 22, 2009, at 11:38 AM, Igor Stasenko wrote:
>
>> But this is not the only UI framework which hates the concurrency -
>> take a look at "groundbreaking" Mac OS :)
>
> yes, but they have a nice mechanism for dealing with this when a  
> worker thread wants to update the UI
>
> - (void)performSelectorOnMainThread:(SEL)aSelector withObject: 
> (id)arg waitUntilDone:(BOOL)wait;
>
> Is there a Squeak equivalent for getting something invoked on the  
> main UI thread?
>
> -Todd Blanchard
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
= 
= 
= 
========================================================================
John M. McIntosh <[email protected]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
= 
= 
= 
========================================================================




_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to