Community
Participate
Working Groups
Environment (and PartEnvironment) are currently defined with static variables for INSTANCE and a stack of environments. This could cause problems if the builder is running and any other thread updates the stack of environments. (such as the WCC or any other tools...such as the test framwork generation code). One solution to this would be to to change these variables to ThreadSafe. We will need to make sure that the threads that use them do not spawn other threads (or if they do, the current environment should be passed along to the new thread). A more radical solution would be to synchronize the stack so that once an environment is pushed onto the stack, any other process that attempts to push another environment will need to wait. This would mean that the WCC would not be able to run until a build completely finishes.
When i said ThreadSafe, I meant ThreadLocal
Modified Environment and PartEnvironment to use ThreadLocals for their stacks.
good