On Thu, Jul 12, 2018 at 11:47 AM Alan Chan via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> I'm a bit confused.
>
> When I just call SAVE RECORD in data entry form (cooperative process), I
> was told it's not OK because it's from a process that have UI. Now, your
> latest reply claimed it's OK. Or only if there's no trigger and transaction?
>
> Alan,

As I understand it, if you have a C/S, SAVE RECORD runs in its own
preemptive thread _on server_. It does not matter if 4D process that called
SAVE RECORD is preemptive or not. As clients does not run preemptive
processes, the whole point seems to be moot.

On single user, SAVE RECORD and the trigger(s) it executes runs in the same
system thread the process that called SAVE RECORD. It means that if you
want to save record in preemptive process, both the method that executes SAVE
RECORD and the trigger need to be able to run preemptively. In fact, as I
understand it, all triggers need to be able to run preemptively.

It means that to do what you described - pass record to worker to be saved
in preemptive thread - would make difference in single user only. But there
you would not gain anything from calling SAVE RECORD in a worker.
Additional messaging with another thread will rather slow the application
down.


> If I create a new process that contain "no" UI from application process,
> this is again, not OK.
>
> When 4D announced preemptive thread is supported in triggers as long as no
> IP variables, I thought this is game changer that 4D could move to
> enterprise solution. Obviously, it's just my illusion. It seems all these
> game changer features in 16 and
> 17 are only beneficial for 4D based web server but not traditional
> client/server solution developers.
>

That is not my understanding.

--

Peter Bozek
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to