Re: [racket-users] Setting parameters between files does not work as expected

2017-04-25 Thread David Storrs
Thanks Ryan, I had forgotten that those were there. ​ -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more option

Re: [racket-users] Setting parameters between files does not work as expected

2017-04-25 Thread Ryan Culpepper
You might be interested in `dsn-connect` and the `data-source` structure (http://docs.racket-lang.org/db/connect.html#%28part._.Data_.Source_.Names%29). Ryan On 4/25/17 8:18 PM, David Storrs wrote: Great. Thanks, Phillip! On Tue, Apr 25, 2017 at 2:14 PM, Philip McGrath mailto:phi...@philipm

Re: [racket-users] Setting parameters between files does not work as expected

2017-04-25 Thread David Storrs
Great. Thanks, Phillip! On Tue, Apr 25, 2017 at 2:14 PM, Philip McGrath wrote: > >1. Yes, that was supposed to be (current-database-handle) >2. A struct would definitely be a reasonable choice for the spec, but >you might just want to add a failure result to the hash-ref calls insid

Re: [racket-users] Setting parameters between files does not work as expected

2017-04-25 Thread Philip McGrath
1. Yes, that was supposed to be (current-database-handle) 2. A struct would definitely be a reasonable choice for the spec, but you might just want to add a failure result to the hash-ref calls inside initialize: in that case default-database-spec could just be #hasheq(), and you wou

Re: [racket-users] Setting parameters between files does not work as expected

2017-04-25 Thread David Storrs
On Mon, Apr 24, 2017 at 9:46 PM, Philip McGrath wrote: > Another thing that might be relevant: >> >> In contrast, direct assignment to a parameter (by calling the parameter >> procedure with a value) changes the value in a thread cell, and therefore >> changes the setting only for the current thr

Re: [racket-users] Setting parameters between files does not work as expected

2017-04-24 Thread Philip McGrath
Another thing that might be relevant: > > In contrast, direct assignment to a parameter (by calling the parameter > procedure with a value) changes the value in a thread cell, and therefore > changes the setting only for the current thread. > http://docs.racket-lang.org/reference/parameters.html

Re: [racket-users] Setting parameters between files does not work as expected

2017-04-24 Thread David Storrs
On Mon, Apr 24, 2017 at 4:43 PM, Scott Moore wrote: > Parameters are thread local, and from reading the docs of > virtual-connection and connection-pool, I think they create new threads to > handle the connections. These threads are probably created before you > parameterize, and thus see the ori

Re: [racket-users] Setting parameters between files does not work as expected

2017-04-24 Thread Scott Moore
Parameters are thread local, and from reading the docs of virtual-connection and connection-pool, I think they create new threads to handle the connections. These threads are probably created before you parameterize, and thus see the original values. Try replacing the virtual-connection stuff w