Discussion:
[Larceny-users] Request: port-closed?
Derick Eddington
2009-03-19 07:05:08 UTC
Permalink
I need something which tells whether a port is closed or not. Does it
already exist and I couldn't find it? If not, I request it be added.
Ikarus, PLT, and Ypsilon provide it as port-closed?. I tried hacking a
temporary version by catching exceptions but that doesn't seem possible
without side-effecting the ports.

Thanks,
--
: Derick
----------------------------------------------------------------
Derick Eddington
2009-03-20 02:50:58 UTC
Permalink
Post by Derick Eddington
I need something which tells whether a port is closed or not. Does it
already exist and I couldn't find it? If not, I request it be added.
Ikarus, PLT, and Ypsilon provide it as port-closed?. I tried hacking a
temporary version by catching exceptions but that doesn't seem possible
without side-effecting the ports.
I think I'm going to use (not (or (input-port? port) (output-port?
port))) to determine if a port is closed, unless there's a problem with
that?
--
: Derick
----------------------------------------------------------------
William D Clinger
2009-03-20 03:50:38 UTC
Permalink
Post by Derick Eddington
I think I'm going to use
(not (or (input-port? port) (output-port? port)))
to determine if a port is closed...
That works in Larceny. I assume you're talking about a
Larceny-specific definition.

Will
Derick Eddington
2009-03-20 04:12:54 UTC
Permalink
Post by William D Clinger
Post by Derick Eddington
I think I'm going to use
(not (or (input-port? port) (output-port? port)))
to determine if a port is closed...
That works in Larceny. I assume you're talking about a
Larceny-specific definition.
Yes. Thanks.
--
: Derick
----------------------------------------------------------------
Loading...