[racket] db connection-pool tip
Are you saying that Ryan should add an appropriate warning to the documentation? -- Matthias
On Aug 21, 2012, at 6:33 PM, Neil Van Dyke wrote:
> When using the "db" collection's "connection-pool" procedure, important safety tip: it uses the "current-custodian" from the context in which "connection-pool" is applied.
>
> (This sounds obvious when stated, but you might not realize it if you retrofitted "connection-pool" into a legacy app, in which the app would transparently create new "connection-pool"s on demand (within short-lived threads, ahem), and your first recycled connection would have "connected?" true before failing with exception "query: not connected", and there were a dozen things you debugged first before your attention is directed back at "connection-pool"...)
>
> Neil V.
>
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4373 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20120821/cef11c55/attachment.p7s>