Hi!

On 2015-07-04 19:30:01+0800, Elias Mårtenson wrote:
> My question is: Should I use trivial-garbage to create a GC hook for the
> connection object so that if the user of the library forgets to close the
> connection, it will get closed eventually once it's GC'ed?

My first impulse is to say “that is what garbage collection is there for”.  It
needs not matter whether the object resides in C or Lisp land or what kind of
resource it is; if the system can identify that it is garbage, it should collect
it.

The alternative would also mean that it is difficult for the system to recover
from the mistake without restart.

Additionally, the API might benefit from a with-async-connection and a
with-open-channel macro.

Yours aye

Svante

-- 
Svante von Erichsen

GPG fingerprint: A78A D4FB 762F A922 A495  57E8 2649 9081 6E61 20DE

Attachment: signature.asc
Description: Digital signature

Reply via email to