Hi Ben, On Sun, 12 Jan 2020 at 15:26, Ben Coman <[email protected]> wrote: > > Now a new consideration for whether Pharo might change the default > processPreemptionYields to false > is ThreadedFFI. Presumably it will be common for a callback to be defined at > same priority as an in-image process. > I can't quite think through the implications myself. > So a question... if a callback is a lower-priority than the current process, > does it wait before grabbing the VM lock (IIUC how that is meant to work)?
The version of Threaded FFI I'm using at the moment is about a month old, but assuming nothing has changed... The callback queue is currently run at priority 70 (vs the UI process at 40). The reasoning as explained by Esteban (from memory) is that you may want callbacks to do some small amount of work and respond quickly. > P.S. Now I wonder about the impact of upcoming Idle-VM. Currently > same-priority-processes are effectively round-robin scheduled > because the high priority DelayScheduler triggers often, bumping the current > process to the back of its runQueue. > When it triggers less often, anything relying on this implicit behaviour may > act differently. Another reason to consider #processPreemptionYields set to false :-) Cheers, Alistair
