> I understand, but I think I am having a problem. > Suppose our app depends heavily on UI (and it doesđ) > ....
Simple approach: Have the UI spin off the work into a new pre-emptive process (or use workers ala the CALL WORKER command). Then have the pre-emptive processes/workers callback to the form using the CALL FORM command. This approach allows the pre-emptive processes to push updates back to the cooperative User Interface. Watch the demo from the 2016 summit on the blog: https://blog.4d.com/4d-summit-2016-laurent-esnault-presents-workers-and-ui-in-preemptive-mode/ -Tim -----Original Message----- From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of Piotr Chabot Stadhouders via 4D_Tech Sent: Wednesday, January 30, 2019 12:05 PM To: 4D iNug Technical <4d_tech@lists.4d.com> Cc: Piotr Chabot Stadhouders <p.stadhoud...@timeff.com> Subject: RE: Does 4D 64-bit Volume desktop use more than 1 core? Hi Jeff, Thanks again for your answer. I understand, but I think I am having a problem. Suppose our app depends heavily on UI (and it doesđ) Suppose our app starts 8 processes showing 8 dialogs showing all kind of variables and arrays, and that need to be refreshed every X seconds Then no UI is out of the question, and pre-emptive methods donât help me a lot I guess. Now suppose I have a machine with 4 cores (What I have heard it is getting difficult to get a machine without multi-core) How can I use the 4 cores to its full extend? I am hoping you are not going to say I canât So, when it is impossible to use 4 cores within the application, is there a way to assign a core to the application? So when starting the application tell the machine to use core 1 When starting a second instance of the application tell the machine to use core 2 Etc. We are in a citrix environment, and all instances of our 4D Volume Desktop application now only use 1 core, and even worse it is using THE SAME core Now Citrix splits the time assigned to 1 4D instance by the number of 4D instances launched, while the other cores are doing totally nothing Is there a solution for this? By the way, and maybe for some of you this is obvious, but not for me: why must there be no UI involved? Wy canât I say in 4D âstart a new process showing a dialog and use core 2â, âstart another process showing a dialog and use core 4â? Gr, Piotr No, not at all. You have to first mark the method that's called first from New Process as preemptive. That method, plus all methods called by that method, and all methods called by those methods, must be written in a preemptive-safe manner (i.e. no UI, no unsafe commands, no plug-ins). If all that happens, that process will be scalable across cores. > On Jan 30, 2019, at 1:25 PM, Piotr Chabot Stadhouders via 4D_Tech > <4d_t...@xxx.xxx<mailto:4d_t...@xxx.xxx>> wrote: > > So, does 4D automagically use more cores in 4D 64-bit or what? > When I follow all pre-emptive advise in the docs or from the iNUG, do I have > a multi-core application? ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com ********************************************************************** ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************