On Sep 14, 2008, at 12:39 PM, Igor Stasenko wrote:

My wish behind all of this is to provide clean separation between core
VM and UI. Then, in Hydra each image could create and manage own
windows.

To complicate things on os-x (macintosh, iPhone) any UI related calls can only be done on the main thread. Thus you cannot open a window, draw, or check the window size, etc on thread 27....

Solving this problem on os-x with the current macintosh VMs requires the VM to be clever.

This clever coding does not work on the iPhone, although this is an open bug with Apple.

For the iPhone we build a "graphic atom" for each display request. On the flush to screen call, we then bundle up the queued atoms and create a "frame update request" which is then executed as a frame region invalidate request on the main thread via a cross thread API call. This triggers (later) an update event on the main thread for the invalidated frame or frames, where we remove the frame update request or requests from the queue,
and paint the queued frame updates

Another issue which perhaps is not obvious is that FFI calls then might need to run on the main thread, some are not clear, for example executing many QuickTime calls (seemly non UI related) on a secondary thread causes a core dump.

--
= = = ========================================================================
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