Re: The connection for this process has been disrupted or the connection could not be established

2017-10-26 Thread Arnaud de Montard via 4D_Tech

> Le 25 oct. 2017 à 18:23, Douglas von Roeder via 4D_Tech 
> <4d_tech@lists.4d.com> a écrit :
> 
> Arnaud:
> 
> [...] That is a function of "cooperative multitasking" and, now that we can 
> run code
> pre-emotively, developers will have to have a more clear understanding of
> (and better control of) what runs, when.
> 
> I'm making a narrow distinction there but I think it's a valid one.

Interesting… Most of the time I use global semaphore to "protect" some (big?) 
data modification or do things that cannot be ensured at the classical record 
lock level. Never tried to use a global semaphore to share machines ressources 
as you describe. 

But back to that delay parameter:
  Semaphore("name";delay)
With a global semaphore, the doc does not say if during delay:
• a/ forth and go between client and server, something like
  C=did I get it?...S=no
  C=did I get it?...S=no
  C=did I get it?...S=yes
  and, if so, what is the frequency of the question
• b/ client sends once the question, server answers once "yes" (in delay) or 
"no" (delay expired)
To make some unsound parallel, with a EoS method, I suppose the situation is 
b/, send the method to execute once, reply once. No forth and go. If the delay 
parameter acts the same in Semaphore function, the difference between the 
"while form" and the "delay form" becomes important. 

-- 
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:4d_tech-unsubscr...@lists.4d.com
**

Re: The connection for this process has been disrupted or the connection could not be established

2017-10-25 Thread Douglas von Roeder via 4D_Tech
Arnaud:

I would say it is "a" way to use a Semaphore and the idea that it is a
limit is the way that I've always understood it.

The fact that it's a gobal semaphore means that it controls access to the
code that follows and the scope of that is for all machines connected to
the server. The semaphore doesn't mean that other methods cannot run. That
is a function of "cooperative multitasking" and, now that we can run code
pre-emotively, developers will have to have a more clear understanding of
(and better control of) what runs, when.

I'm making a narrow distinction there but I think it's a valid one.

--
Douglas von Roeder
949-336-2902

On Wed, Oct 25, 2017 at 9:15 AM, Arnaud de Montard via 4D_Tech <
4d_tech@lists.4d.com> wrote:

>
> > Le 25 oct. 2017 à 17:55, Douglas von Roeder via 4D_Tech <
> 4d_tech@lists.4d.com> a écrit :
> >
> > 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.
>
> Yes, but when I look at examples in the Semaphore function, only the 1
> (the oldest?) uses while+idle. And I remember Olivier Deschanels saying
> during a training that the second parameter was made to limit the delay.
> Now, is it "a" way to delay, "the" way, when to mix both? That's what I'd
> like to know. And more specifically with a global semaphore, as in David's
> situation.
>
> --
> 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:4d_tech-unsubscr...@lists.4d.com
> **
>
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: The connection for this process has been disrupted or the connection could not be established

2017-10-25 Thread Arnaud de Montard via 4D_Tech

> Le 25 oct. 2017 à 17:55, Douglas von Roeder via 4D_Tech 
> <4d_tech@lists.4d.com> a écrit :
> 
> 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.

Yes, but when I look at examples in the Semaphore function, only the 1 (the 
oldest?) uses while+idle. And I remember Olivier Deschanels saying during a 
training that the second parameter was made to limit the delay. Now, is it "a" 
way to delay, "the" way, when to mix both? That's what I'd like to know. And 
more specifically with a global semaphore, as in David's situation. 

-- 
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:4d_tech-unsubscr...@lists.4d.com
**

Re: The connection for this process has been disrupted or the connection could not be established

2017-10-25 Thread Douglas von Roeder via 4D_Tech
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 <
4d_tech@lists.4d.com> wrote:

>
> > Le 25 oct. 2017 à 04:27, David Ringsmuth via 4D_Tech <
> 4d_tech@lists.4d.com> 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:4d_tech-unsubscr...@lists.4d.com
> **
>
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: The connection for this process has been disrupted or the connection could not be established

2017-10-25 Thread Arnaud de Montard via 4D_Tech

> Le 25 oct. 2017 à 04:27, David Ringsmuth via 4D_Tech <4d_tech@lists.4d.com> 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:4d_tech-unsubscr...@lists.4d.com
**

The connection for this process has been disrupted or the connection could not be established

2017-10-24 Thread David Ringsmuth via 4D_Tech
The “Semaphore” function is crashing 4D Remote’s connection to 4D Server.

While(Semaphore("MySemaphore";300)) // ←- this line crashes
// more coding here
 End while

4D Remote v15.4 Built 32bit on OSX 10.9.5
4D Server v15.4 Built 32bit on OSX 10.9.5 8GB Ram Core 2 Duo

The Client-Server connections timeout is set to 5 minutes.
App-Nap is disabled on both Remote and Server.
Use legacy network layer is CHECKED

The Server computer console logs do not seem so show any entries related to 
this crash.
 
Please help!

David Ringsmuth

**
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:4d_tech-unsubscr...@lists.4d.com
**