On 2010-Jul-17 08:52:49 +0100, "Dr. David Kirkby" <david.kir...@onetel.net> wrote: >I don't know if you have every written multi-threaded code, but it is >non-trivial and very easy to make a mistake. Experience shows me that those >mistakes show up on on one platform only. It's hard enough to track the bug if >you wrote the code yourself, since the bugs are not always reproducible. It >would be 100x harder if someone else had written the code.
Multi-threaded bugs often manifest as race conditions - which are notoriously hard to track down. >So IMHO, it would be unwise to *only* have an ability to set the number of >threads globally. What may be more useful, is an ability to set the number of >threads globally, but have the ability to override that for particular cases. How about an extension to the standard environment variable parsing so that SAGE_FOO_bar is equivalent to (and overrides) SAGE_FOO in package 'bar' only? This allows variables to be overridden for specific packages without having to explicitly define lots of specific environment variables. Assuming $pkg contains the package name, you can assign the result to 'FOO' with: eval FOO="\${SAGE_FOO_$pkg:-$SAGE_FOO}" -- Peter Jeremy
pgpr7GKTtblDl.pgp
Description: PGP signature