So if you are going to write it twice (once for preemptive and once for not) 
separate the methods and you are there….


Method1

        $Find_i:=find in array(<>aPerson_ID;$PersonID)
        $TheName:=<>aPerson_Name{$Find_i}

Method1Preemptive
        Query([person];[Person]id=$PersonID)
        $TheName:=[Person]Name

Of course you would need to duplicate the surrounding code as well if any. But 
if you are planning on maintaining two code bases, your worker can just use the 
query and do whatever else it needs. Your regular process code can use your 
interprocess cache. Also if you don’t let your worker die, the worker can load 
the cache once and store them as process vars. Process vars wouldn’t need to be 
loaded each time as with regular processes. There are lots of easy ways to make 
this work other than allowing interprocess vars into a method you want to call 
preemptively.

My survey opinion is still unchanged… for what workers are designed to do the 
limitations are not a huge burden. Most uses I see for preemptive processes are 
for server jobs, report writing, imports, exports, syncing between databases 
etc.


Neil
--
Neil Dennis
4D Developer since 1990

GreaText - Designing Software for the Way You Work
716 East 1850 N
North Ogden, UT 84414

mailto:[email protected]
http://www.greatext.com/



**********************************************************************
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