Hi Tim,

Using a pointer is not a problem. 4D does not restrict you from using a
pointer with the command that calls Trigger. Additional explanation can be
found here: 
ftp://ftp-public.4d.fr/Documents/Products_Documentation/LastVersions/Line_1
5R5/VIntl/4D_Upgrade_v15_R5.pdf ­ page 45.
 

When the compiler sees the command such as SAVE RECORD, it knows that a
trigger method will need to be checked for the thread safety. If you call
SAVE RECORD([Table_1]), it knows that it needs to check in the Trigger
method for [Table_1]. If you call SAVE RECORD($ptrOnTable->), the compiler
does not know the exact table that you are calling. Therefore, it will
check the Trigger method for all tables for the thread safety. If any of
the trigger methods contain a thread-unsafe command, the compiler will
report the problem. Now it is your chance to make changes in your Trigger
methods and remove/replace any found thread-unsafe code.

Hope this clear up some confusion.


Regards,
Add

On 11/1/16, 2:15 PM, "4D_Tech on behalf of Tim Nevels"
<4d_tech-boun...@lists.4d.com on behalf of timnev...@mac.com> wrote:

>On Nov 1, 2016, at 3:35 PM, Tony Ringsmuth wrote:
>
>> CURRENT RESTRICTIONS to using preemptive processes (up through the
>>upcoming release of v16):
>> 1: Any method that uses any restricted items cannot be called
>>preemptively.  Restricted items include:
>>      A: Interprocess variables
>>      B: Plugins
>>      C: Various 4D commands
>>      D: Any component method that is not Preemptive save
>> 2: No method that calls any other method that has restricted items can
>>be called preemptively
>> 3: Any method that saves records via pointers to a table is restricted
>>(If you have any Table Trigger in the whole database that has any
>>restricted items (as listed in #1 or #2))
>>      Example: SAVE RECORD($MyTable->)
>> 
>> QUESTION #1
>>       In light of the current restrictions, how likely are you to
>>leverage the use of Preemptive Processing in the near future?
>
>NOT LIKELY because of table pointer usage. I was not aware of this
>restriction. Sounds like a serious limitation. I was not aware of pointer
>restrictions. 
>
>Can you reference documentation talking about this? I¹d like to read more
>about the restrictions on using pointers in preemptive code.
>
>I have trigger code like ³StandardTriggerCode(
>->[Table1]UpdatedByUserName ; Š )²  Are you saying that will not be
>allowed and thus the StandardTriggerCode method cannot run preemptively?
>
>
>>

**********************************************************************
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:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to