Re: Checking If Methods Are Preemptive Ready

2019-04-17 Thread Dani Beaubien via 4D_Tech
I am pretty sure that the METHOD GET ATTRIBUTES command will also return that 
information.

In my Code Analysis component, if you open the “Explorer” window there is the 
ability to filter the methods based on the preemptive capable attributes. Super 
useful and you can do it live.


Dani Beaubien
Open Road Development

> On Apr 11, 2019, at 11:23 AM, Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi Vincent,
> 
> Perfect. Thank you very much!
> 
> --
> Cannon.Smith
> Synergy Farm Solutions Inc.
> Aetna, AB Canada
> 
> 
> 
> 
>> On Apr 11, 2019, at 11:10 AM, Vincent de Lachaux via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> If you activate the generation of the symbol file in the compilation 
>> preferences, compile your database then open the myDtabase_symbols.txt files 
>> created near the structure file, All methods are listed at the end of the 
>> file with the status "Thread Safe" or "Thread Unsafe".
> 
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Checking If Methods Are Preemptive Ready

2019-04-12 Thread Cannon Smith via 4D_Tech
Hi Wayne,

Thanks for the idea. So far the symbols files has provided what I need. Not as 
simple to parse as if it had been spit out in JSON, but okay. Mostly I’m trying 
to get an idea of which of my “foundation” modules are not thread safe, but 
could be.

Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Apr 11, 2019, at 4:37 PM, Wayne Stewart via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I can't find the db I did this in but what I did was this:
> 
> METHOD GET PATHS(Path project method;$MethodNames_at)
> METHOD GET ATTRIBUTES($MethodNames_at;$Attributes_ao)
> 
> Create a new array with those that area already marked as preemptive
> safe.  Save it somewhere
> Then use METHOD SET ATTRIBUTES to set them all to preemptive safe.
> Compile and enjoy all the errors coming in.
> 
> You should be able to work through the list (slowly).
> If you run out of time reapply the original set of attributes from the
> initial call.
> 
> Then repeat until you've got everything that is safe labelled that way.
> 

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

Re: Checking If Methods Are Preemptive Ready

2019-04-11 Thread Keisuke Miyako via 4D_Tech
that might be one way to develop.

alternatively you could limit the list to all four types of "starter" methods:

1 Execute on server
2 New process
3 CALL WORKER
4 method called via menu item with "new process" enabled

there is really no need to examine every single subroutine.

that said, moving forward,
I suppose it would be good practice to make sure new project methods are marked 
as preemptive-only.

then, if compilation fails (you call a UI or printing command, for example)
you can decide whether to delegate the task to a cooperative process (CALL 
FORM),
use Signal, or uncheck the preemptive checkbox.

2019/04/12 7:37、Wayne Stewart via 4D_Tech 
<4d_tech@lists.4d.com>のメール:
You should be able to work through the list (slowly).


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

Re: Checking If Methods Are Preemptive Ready

2019-04-11 Thread Wayne Stewart via 4D_Tech
Cannon,

I can't find the db I did this in but what I did was this:

METHOD GET PATHS(Path project method;$MethodNames_at)
METHOD GET ATTRIBUTES($MethodNames_at;$Attributes_ao)

Create a new array with those that area already marked as preemptive
safe.  Save it somewhere
Then use METHOD SET ATTRIBUTES to set them all to preemptive safe.
Compile and enjoy all the errors coming in.

You should be able to work through the list (slowly).
If you run out of time reapply the original set of attributes from the
initial call.

Then repeat until you've got everything that is safe labelled that way.

Regards,

Wayne



On Fri, 12 Apr 2019 at 07:05, Keisuke Miyako via 4D_Tech
<4d_tech@lists.4d.com> wrote:
>
> that's right, method attributes only inform you of their preferences.
>
> you could enable symbol file generation, compile, and look at the bottom of 
> the generated symbol file.
>
> > 2019/04/12 3:33、Cannon Smith via 4D_Tech <4d_tech@lists.4d.com>のメール:
> >
> > I believe that preemptive capable in that context just means that you’ve 
> > set the method properties that way. I don’t think it means that if you 
> > tried to compile the code would actually work in a preemptive context. I’d 
> > be happy to be corrected if I’m wrong?
>
>
>
>
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Checking If Methods Are Preemptive Ready

2019-04-11 Thread Keisuke Miyako via 4D_Tech
that's right, method attributes only inform you of their preferences.

you could enable symbol file generation, compile, and look at the bottom of the 
generated symbol file.

> 2019/04/12 3:33、Cannon Smith via 4D_Tech <4d_tech@lists.4d.com>のメール:
>
> I believe that preemptive capable in that context just means that you’ve set 
> the method properties that way. I don’t think it means that if you tried to 
> compile the code would actually work in a preemptive context. I’d be happy to 
> be corrected if I’m wrong?




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

Re: Checking If Methods Are Preemptive Ready

2019-04-11 Thread Cannon Smith via 4D_Tech
Hi Dani,

I believe that preemptive capable in that context just means that you’ve set 
the method properties that way. I don’t think it means that if you tried to 
compile the code would actually work in a preemptive context. I’d be happy to 
be corrected if I’m wrong?

Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Apr 11, 2019, at 12:08 PM, Dani Beaubien 
>  wrote:
> 
> I am pretty sure that the METHOD GET ATTRIBUTES command will also return that 
> information.

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

Re: Checking If Methods Are Preemptive Ready

2019-04-11 Thread Cannon Smith via 4D_Tech
Hi Vincent,

Perfect. Thank you very much!

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Apr 11, 2019, at 11:10 AM, Vincent de Lachaux via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> If you activate the generation of the symbol file in the compilation 
> preferences, compile your database then open the myDtabase_symbols.txt files 
> created near the structure file, All methods are listed at the end of the 
> file with the status "Thread Safe" or "Thread Unsafe".

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

Re: Checking If Methods Are Preemptive Ready

2019-04-11 Thread Vincent de Lachaux via 4D_Tech
Hello,

If you activate the generation of the symbol file in the compilation 
preferences, compile your database then open the myDtabase_symbols.txt files 
created near the structure file, All methods are listed at the end of the file 
with the status "Thread Safe" or "Thread Unsafe".

Vincent




> On 11 Apr 2019, at 18:53, Cannon Smith via 4D_Tech <4D_Tech@lists.4D.com> 
> wrote:
>
> Does anyone know if there is a way to get a list of methods that are (or are 
> not) preemptive ready?
>
> Thanks.
>
> --
> Cannon.Smith
> Synergy Farm Solutions Inc.
> Aetna, AB Canada
> 
> 
>
>
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Checking If Methods Are Preemptive Ready

2019-04-11 Thread Cannon Smith via 4D_Tech
Does anyone know if there is a way to get a list of methods that are (or are 
not) preemptive ready?

Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




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