Arnaud:

My understanding is that, given that 4D's scheduler has been "cooperative
multitasking" for virtually all of its history, the Idle command instructs
the current process to yield time to other processes. Without the While…End
while loop and the Idle command, the current process would hit the
Semaphore command and processing would stop until 300 ticks had passed.
That process would not yield CPU, causing all processing to stop.

That's how I've come to understand the issue over the years and I'd love to
see someone with actual knowledge of the  issue weigh in.


--
Douglas von Roeder
949-336-2902

On Wed, Oct 25, 2017 at 8:40 AM, Arnaud de Montard via 4D_Tech <
[email protected]> wrote:

>
> > Le 25 oct. 2017 à 04:27, David Ringsmuth via 4D_Tech <
> [email protected]> a écrit :
> >
> > The “Semaphore” function is crashing 4D Remote’s connection to 4D Server.
> >
> > While(Semaphore("MySemaphore";300)) // ←- this line crashes
> > // more coding here
> >  End while
>
> The doc "about semaphore" they say "Here is typical code for using a
> semaphore":
>   While(Semaphore("MySemaphore";300))
>     IDLE
>   End while
> I never understood why we still need a While since the second parameter is
> available…
>
> I'd try those:
> - add IDLE or DELAY PROCESS after While
> - play with the waiting time (second parameter - no idea of what the max
> can be)
> - remove the while and raise the up the waiting time
> and call 4D if it still crashes…
>
> --
> Arnaud de Montard
>
>
> **********************************************************************
> 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]
> **********************************************************************
>
**********************************************************************
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