-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 19 Aug 2008, at 10:27 am, Jörg F. Wittenberger wrote:
That's what I have been able to do bevor. That's not the aim. I need to change all timeouts for all thread which are started after the change.
This boils down to an interesting question: if you have some values that generally follow the 'design pattern' of a parameter - with dynamically-scoped thread-local overrides and all that - how do you tweak it from outside the thread?
I think this is only a legitimate thing to do in debugging; if you want to do that as part of your normal use of the app, then using parameters in the first place was a mistake!
Normal production configuration changes should probably be handled in a server system by instructing the master thread to set new values into its parameters, which *new session threads* would then inherit from it, so that existing session threads keep the old values - unless you want to audit your code for the consequences of a value used in the session threads changing at any possible point in the session thread (and we're back to the dangers of mutable state again).
But, for debugging - it'd be nice to work out some facility for setting and getting parameters within the context of an explicitly named thread, albeit living with the knowledge that the changes would be automatically undone when a dynamic scope that sets the parameter exits, purely for debugging. As long as we can suitably discourage people from using it as a day-to-day inter-thread communications system ;-)
/Jörg
ABS - -- Alaric Snell-Pym Work: http://www.snell-systems.co.uk/ Play: http://www.snell-pym.org.uk/alaric/ Blog: http://www.snell-pym.org.uk/?author=4 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkiqlaEACgkQRgz/WHNxCGrXkQCbBmPIX9rrX7NYVU4aLKHc2hxq wbIAnjdpMnZTAth/ENTcy5hbydXpC/VX =Wk4O -----END PGP SIGNATURE----- _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
