Hello,
I found some information in the documentation (header files, I can not stress
this enough).
short answer, the library supports it, the plugin doesn't.
---
from format.h
// good resource for format strings:
http://www.mvps.org/dmcritchie/excel/formula.htm
// Good explanation of custom
This is an old-style process variable declared as text array. The
popup/dropdown displays the 0 element value properly when the array is empty,
but does not display it when the array has elements.
that has not been my experience (the array is not empty)
to be precise, I used v17.232641 on
Hi Neil,
> On Jan 30, 2019, at 3:40 PM, Dennis, Neil wrote:
>
>> If a shared method is marked as preemptive capable, any shared method it
>> uses must also be marked as preemptive capable. Otherwise 4D says the method
>> further down in the call chain is not thread safe even if it has no
Hi Christian,
That is really impressive since they seem like complex plugins that need a lot
of 4D interaction and there are currently very few plugin API calls that are
thread safe.
Are you really saying that I can mark a 4D method as preemptive capable and use
significant functionality of
> I'm not aware any commercial 4D plugin that works in preemptive mode.
hmCal and hmReports are thread safe.
--
Grüße/Regards,
[heubach-media] | Christian Sakowski
christian.sakow...@heubach-media.de
Tel: +49/(0)40/52 10 59-23
> Am 30.01.2019 um 22:16 schrieb John DeSoi via 4D_Tech
I hate to interject but will do anyway.
I have a strong suspicion that you are going after the wrong target.
OCI is not the reason your app is running on a single core.
it is the fact that you are running an engined merged application under Citrix.
had it been 4D Remote connecting to 4D Server,
it is normally a good thing that work is spread across multiple cores.
it prevents the CPU from over heating.
a cooperative thread may use many cores,
just not "at the same time".
anyway,
if you feel you have reason to assign a CPU to an application,
there is CPU affinity (Google the word
Hi Tim,
Now for me an important question: is 4D for Oci pre-emptive?
In short: We use for 90% UI and 4D for OCI commands. How can I make use of more
than 1 core?
Nu colleague says Word and Excel also use more cores, so why can't we?
Gr,
Piotr
I see, this is relatively new development - I
in your case, it is mostly irrelevant whether 4D uses multiple cores or not.
you only have one mouse pointer or one blinking cursor on the screen.
you are not going to click multiple buttons at the same time,
or type text on multiple windows at the same time.
the dialog does not need to use
> If a shared method is marked as preemptive capable, any shared method it uses
> must also be marked as preemptive capable. Otherwise 4D says the method
> further down in the call chain is not thread safe even if it has no thread
> unsafe commands.
Wait, If the parent is marked preemptive the
Right -
"...that a thread safe method (call chain) in a component..."
:)
On Wed, 30 Jan 2019 15:33:27 -0600, John DeSoi via 4D_Tech wrote:
> Chip,
>
> This is true, but there is some extra complexity involved with components:
>
> If a shared method is marked as preemptive capable, any shared
the example DB I posted earlier in this thread uses New list and OBJECT SET
LIST BY REFERENCE.
the list can be totally dynamic, it does not need to exist in the toolbox.
when you use default values, you essentially using text arrays constants.
that is why, for example, if the popup menu is
Chip,
This is true, but there is some extra complexity involved with components:
If a shared method is marked as preemptive capable, any shared method it uses
must also be marked as preemptive capable. Otherwise 4D says the method further
down in the call chain is not thread safe even if it
Yes, I was not trying to imply that all plugins are thread safe, only that it
is possible to create one following the direction outlined in the SDK. It is
supported and there are significant speedup benefits if you can make it work.
I'm not aware any commercial 4D plugin that works in
there was no mention of components.
I assume, as components are effectively 4D methods, that a thread safe
method (call chain) in a component, would make a call to the component
method from the host system thread safe as well.
Chip
On Wed, 30 Jan 2019 21:00:27 +, Timothy Penner via 4D_Tech
I see, this is relatively new development - I have sent a request to the Doc
Team to update the documentation to reflect this.
In either case, it would appear that although the SDK has been updated, the
individual plugin developers would still need to update their plugins and make
those
Hi Tim,
The header file in the publicly available SDK indicates which plugin API entry
points are thread safe (currently a small number).
https://github.com/4d/4D-Plugin-SDK
See further discussion here including input from 4D France:
> Yes the 4d plugin sdk allows to build preemptive ready
John,
Plugin development is not something 4D Tech Support usually handles, so I may
have missed that - in either case, the docs seem like it is not possible...
http://livedoc.4d.com/4D-Language-Reference-17/Processes/Preemptive-4D-processes.300-3730331.en.html#3687097
{
Writing a thread-safe
In version 17 you can use plug-ins in preemptive mode if the plugin call is
marked as thread safe. I converted my Postgres component/plugin to work in
preemptive mode. Tests show 300% to 400% improvement over single core execution.
See this lengthy thread on the forum for issues in converting
Jim,
> Piotr mentioned that they are using 4D OCI, not the 4D database. I haven’t
> really kept up with the pre-emptive restrictions, but can plugins specify
> that they can run pre-emptively? Given some of the other limitations I’d have
> assumed plugins would be required to run in the
Hi Neil,
It looks like the docs were updated in v15R5:
http://livedoc.4d.com/4D-Language-Reference-15-R5/Processes/New-process.301-2936977.en.html
{
If the execution context supports preemptive mode and if method is declared
"thread-safe", the new 4D process will be executed in a preemptive
On Jan 30, 2019, at 12:07 PM, Timothy Penner via 4D_Tech <4d_tech@lists.4d.com>
wrote:
>
>> I understand, but I think I am having a problem.
>> Suppose our app depends heavily on UI (and it does)
>>
>
> Simple approach:
>
> Have the UI spin off the work into a new pre-emptive process (or
> The NEW PROCESS command is able to spawn a Preemptive or Coopertive process;
> this depends on the preemptive method property of the method that is called
> by the NEW PROCESS command.
Thanks Tim,
Is this new with 4D v17?
I see in the v17 docs it is documented that new process can run
Neil,
The NEW PROCESS command is able to spawn a Preemptive or Coopertive process;
this depends on the preemptive method property of the method that is called by
the NEW PROCESS command.
-Tim
**
4D Internet Users Group (4D
No, a normal process can be preemptive (started with New process or Executed on
server) as long as the starting method is preemptive capable.
John DeSoi, Ph.D.
> On Jan 30, 2019, at 2:14 PM, Dennis, Neil via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
>
> I thought for a process to work on a
> If all that happens, that process will be scalable across cores.
Did I miss something?
I thought for a process to work on a separate core it needed to be a WORKER
process and preemptive capable. So if you call new process it will not be
preemptive. If you call worker it can be preemptive if
> I understand, but I think I am having a problem.
> Suppose our app depends heavily on UI (and it does)
>
Simple approach:
Have the UI spin off the work into a new pre-emptive process (or use workers
ala the CALL WORKER command).
Then have the pre-emptive processes/workers callback to
Hi Jeff,
Thanks again for your answer.
I understand, but I think I am having a problem.
Suppose our app depends heavily on UI (and it does)
Suppose our app starts 8 processes showing 8 dialogs showing all kind of
variables and arrays, and that need to be refreshed every X seconds
Then no UI
No, not at all. You have to first mark the method that's called first from New
Process as preemptive. That method, plus all methods called by that method, and
all methods called by those methods, must be written in a preemptive-safe
manner (i.e. no UI, no unsafe commands, no plug-ins).
If all
Hi Lutz, Jeffrey,
Thanks for your answers.
So it is about using 64-bit, and writing preemptive-safe methods
I see a lot of 4D commands turning into preemptive-safe commands, so that's good
Now for me probably work has to be done, but I am confused what is needed.
1. We don't use 4D tables,
I see, it uses a list for the choices but can display a value not in the list.
That will be useful for those cases where the values come from a list. In this
case the popup choices are set dynamically based on other values. This should
also work with the “Default Values” property, right? Is
Chuck,
If AddButton is on the subform you don't need CALL SUBFORM CONTAINER at
all. Just handle it there in your subform code:
OBJECT SET VISIBLE(*;"AddButton";Not(Read only state([table])))
I would put that in the form method code (i'm talking about the actual form
you use as the subform) so
I don't know anything about the plugin you were attempting to use, but one way
to create formatted documents for Excel is to use XML. You specify the type for
each cell. I'm sure you could figure out the format option you want by saving a
document with Excel and looking at the XML.
John DeSoi,
The AddButton is on subform. So I am not sure what goes on. Should I be setting
call subform container in the print form or the subform. Docs look like it
should be in subform form method. Is this not the case and yes trace seems to
not show anything anywhere
Regards
Chuck
Compiled 64-bit Volume Desktop can use more than one core, depending upon how
you write your code. 64-bit 4D is required, as is being compiled, in the
current implementation.
You need to write preemptive-safe methods and your methods need to be marked as
preemptive in the method properties.
> So then the real questions are :
>
> * Is it correct that 4D Volume desktop uses only 1 core?
No.
> * How can I enable 4D Volume desktop to use all cores?
No. There isn't such a switch.
It is a bit more complicated, a short query for "core" on the knowledgebase
kb.4d.com reveals:
Hi Pat,
Thanks for your answer.
So then the real questions are :
* Is it correct that 4D Volume desktop uses only 1 core?
* How can I enable 4D Volume desktop to use all cores?
Gr,
Piotr
Piotr
I believe the "bitness" has more to do with how it uses RAM than cores.
Pat
On Wed, 30 Jan
Piotr
I believe the "bitness" has more to do with how it uses RAM than cores.
Pat
On Wed, 30 Jan 2019 at 09:13, Piotr Chabot Stadhouders via 4D_Tech <
4d_tech@lists.4d.com> wrote:
> Hi all,
>
> First of all, I must say I am no hardware expert, so maybe this is a
> stupid question.
>
> It seems
Hi,
Some time ago I needed to export data as fixed length strings, including
numbers (reals).
So I wrote this method:
//
Uty_FixLengthNum(rToConvert;lLength;lLengthDec;tFillChar;tDecSign;bAlwaysReturnDec)
-> tFixLengthNum
//
// User
Hi all,
First of all, I must say I am no hardware expert, so maybe this is a stupid
question.
It seems that 4D 32-bit Volume desktop only uses 1 core.
But does 4D 64-bit Volume desktop use all available cores?
Gr,
Piotr
**
4D
40 matches
Mail list logo