STOP-AFTER .. well... doesn't ...

Posted by jmls on 22-Nov-2011 13:00

10.2B SP05

Either something is broken or I'm being stupid. Don't place any bets just yet ...

take this snippet of code

repeat stop-after 1 on stop undo, leave:

      SocketHandle:connect("-H SomeHost -S SomePort").

      leave.

end.

I *expected* that this would timeout after a second if either SomeHost or SomePort was not available.

it doesn't.

Discuss.

All Replies

Posted by Thomas Mercer-Hursh on 22-Nov-2011 13:15

The documentation says:

Other points to consider are:

  • If the expression evaluates to zero or less, then this is the equivalent of not specifying a STOP-AFTER phrase.
  • STOP-AFTER phrases are not intended to interact with user interfaces.
  • Blocking calls to third party software components, where the AVM has transferred execution control, cannot be timed out. This category includes operating system calls, MS Windows system calls, and calls to any third party DLLs and Unix shared objects.

I would guess this falls under the third category.

Posted by jmls on 22-Nov-2011 14:00

the socket handle is a plain old progress socket. So I guess that it

doesn't fall under category 3

Unless they classify a socket connection as an O/S call.

Bugger.

On 22 November 2011 19:16, Thomas Mercer-Hursh

Posted by Thomas Mercer-Hursh on 22-Nov-2011 14:07

That's my guess.  It is something that reaches outside the AVM and therefore is no longer in scope of control of the AVM.  The ABL portion is really just an interface to the OS feature.

Posted by Thomas Mercer-Hursh on 22-Nov-2011 14:08

It would be interesting to test for a DB connection.  While that seems like all ABL, it actually involves connecting throught the TCP/IP layer, so I wouldn't be at all surprised if there was the same limitation.

Posted by Admin on 22-Nov-2011 14:11

Unless they classify a socket connection as an O/S call.

I'd do so.

Posted by gus on 22-Nov-2011 14:48

It is a system call. Furthermore, a connect() system call does not have a timeout parameter. It does time out eventually though.

Posted by jmls on 22-Nov-2011 15:00

is there any way of specifying a timeout ? some third party tcp

components have a timeout property.

On 22 November 2011 20:48, Gus Bjorklund

This thread is closed