DELAY PROCESS(ProcNum;1) seems to delay 2 to 4 ticks

Jack Des Bouillons (4/7/14 10:00AM)
Tony Ringsmuth (4/7/14 12:14PM)
Arnaud de Montard (4/7/14 6:37PM)
Keisuke Miyako (4/8/14 12:50AM)
Tony Ringsmuth (4/8/14 4:11PM)
Joshua Fletcher (4/9/14 8:49PM)


Jack Des Bouillons (4/7/14 10:00 AM)

[JPR]?

I seem to recall some speaker at a Summit (might have been JPR, might
have
been Josh, someone else?) saying that

DELAY PROCESS(Current process;0)

Would do the trick of freeing up processor time.

I've never had a need to test it out, but you might try it.

Jack des Bouillons

On 4/7/14 9:07 AM, "Tony Ringsmuth" <tony01@... wrote:

color><param>00000,0000,DDEE/param>II discovered that DELAY
PROCESS(Current process;1) consistently actually
delays 2 to 4 ticks, not just one tick. ?So, a loop such as:
Repeat
`Do Something
Delay process(current process;1)
Until(someCondition)
... Will only run about 15 times/second compiled.
/color>

Tony Ringsmuth (4/7/14 12:14 PM)

[JPR]?

I've thought about that, but, I'm un-easy about multiple processes
handling
the same tcp requests, and possible getting out of sync.

Also, I'm un-certain if multiple would all run basically at the same
tick,
and then having a big pause until the next cycle of all of them. ?I
have not
tested this one yet.

Tony

On 4/7/14 11:37 AM, "Arnaud de Montard" <arnaud@... wrote:

color><param>00000,0000,DDEE/param>
If the tcp listening process does not have to be unique, you could use
more
than one?
/color>

Arnaud de Montard (4/7/14 6:37 PM)

[JPR]?

If the tcp listening process does not have to be unique, you could use
more than one?

--
Arnaud de Montard

Keisuke Miyako (4/8/14 12:50 AM)

[JPR]?

Hello,

the point was described in a tech note (05-20, Jean-Yves Fock-Hoon)

Thibaud also covered it in a Summit presentation 2009.

in essence, IDLE yields to the scheduler, only if the process has
exceed
its allocated 1 tick.
otherwise it just carries on. (c.f. PA_Yield)

DELAY PROCESS yields to the scheduler immediately (c.f.
PA_YieldAbsolute)

miyako

On 2014/04/08 3:00, "Jack Des Bouillons"
<Jack.DesBouillons@... wrote:

color><param>00000,0000,DDEE/param>DDELAY PROCESS(Current process;0)
/color>

Tony Ringsmuth (4/8/14 4:11 PM)

[JPR]?

JPR,

Thank you for contributing to this post; ?I really appreciate it.

I hadn't realized before that DELAY PROCESS, for tick counts of less
than
about 4 are rather imprecise.

I've decided to approach this by recording the last real activity in my
loop, and for a period of Milliseconds, do DELAY PROCESS($cp;0), and
then
after that period of MS, do DELAY PROCESS($cp;1)

--
Tony Ringsmuth
Business Brothers Inc.
763-420-8686

Joshua Fletcher (4/9/14 8:49 PM)

[JPR]?

Another vote for this technique, I think it's the least opaque
solution.

Kind regards,

Josh

--
Josh Fletcher
Technical Account Manager
4D, Inc

color><param>00000,0000,DDEE/param>
/color>

-----Original Message-----
color><param>00000,0000,DDEE/param>DDid could try to pause less than
once a loop? I mean:
/color>

Reply to this message

Summary created 4/9/14 at 4:39PM by Intellex Corporation

Comments welcome at: feedback@intellexcorp.com