On Wed, Oct 9, 2019 at 10:50 AM Esteban Lorenzano <estebanlm@gmail.com> wrote:
There are a lot of things to consider, not just the native widgets.
For example: how do you run those widgets? Because you need an event loop⦠and while linux and windows do not care in which thread you run this, macOS requires you to run it in the main thread. This means you need to run the VM using one of two strategies:
1) using the idle signal of Gtk (in case of gtk, but other frameworks have similar things). This is of course suboptimal and forget about real-time processing. 2) running the VM in a separated thread. This works as expected (and it also follow apple application design recommendations) but then you need to make sure the communication between the main thread and your vm thread work as expected (and is not so easy)
With Pablo we are working on (2), and I have to say that yes, if you do not manage well things, you will not have more speed âjust becauseâ :)
This is great. Android does the same thing as MacOS, and it is even enforced by the OS, it will mark any app as unresponsive if it blocks the UI thread. You can fork Threads that communicate with the UI thread by means of a "Handler" [1], to map this using a dynamic language is simpler, but you'd need an event loop in the UI first (I don't know whether we have this in Pharo). Regards, [1] https://developer.android.com/training/multiple-threads/communicate-ui Esteban A. Maringolo