On Wed, Nov 2, 2016 at 4:32 PM, Add Komoncharoensiri <
[email protected]> wrote:

> That is exactly what a constant is for. If the value is never changed,
> then those IP variables can easily be replaced by a constant.
>

Some, yes. I use interprocess variables very rarely - if I can do without
them, I do. For example, I use them for inter-process messaging - maybe
workers will help with their ability to send messages. Obviously, they
cannot be replaced by constants.

I use interprocess variables for stuff like logged user code (if I run my
own password system)  or machine MAC or similar stuff that is static, but
changes from machine to machine and from session to session.

With last project I am trying to replace such static interprocess variable
with single object, created in On Startup - that each process pass to child
processes it spans. As object is passed by reference, only one object
should exist, with each process containing its own reference. This should
work with preemptive processes (I believe so - did not checked
documentation.)

-- 

Peter Bozek
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to