in reality, "preemptive or not" is a property of the thread, not the method.
the compiler needs to now how to start a thread before your code reaches a 
conditional statement.

a warning won't work, you will simply get a runtime error even if you find a 
way to "fool" the compiler.
(for example, by conjuring a method name passed to "New process" by string 
concatenation)

the idea is to leave all method properties to "agnostic",
and only set "preemptive" for methods that specifically start a process 
(=thread);
via New process, Execute on server, or a menu item.

all generic subroutines will simply inherit the property of the thread in which 
it was called.

no need for duplicates.

> 2016/09/08 10:25、John DeSoi <[email protected]> のメール:
>
> The compile time error means that separate methods for the same functionality 
> will often need to be created. For example, I have a "NET_Send" method which 
> can transport a blob using a plugin or HTTP Post. Assuming the HTTP Post 
> method allows preemption but the plugin does not, I now have to split that 
> into two separate methods. If there are hundreds of callers to the original 
> method, now I have to change all of that code creating duplicate methods just 
> so one option can work in preemptive mode.
>
> Why not provide an option to get compile warnings instead of errors? Would it 
> be that difficult for the compiler just to emit a runtime error if a 
> non-preemptive command was called in a preemptive process?



宮古 啓介
セールス・エンジニア

株式会社フォーディー・ジャパン
〒150-0043
東京都渋谷区道玄坂1-10-2 渋谷THビル6F
Tel: 03-6427-8441
Fax: 03-6427-8449

[email protected]
www.4D.com/JP

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