Bug 57886 - Concurrency issue while initializing containers and variables
Summary: Concurrency issue while initializing containers and variables
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M9   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-08 09:29 EDT by Jerome Lanneluc CLA
Modified: 2004-05-18 11:38 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2004-04-08 09:29:16 EDT
I20040407

If 2 threads run JavaCore#setClasspathContainer(...) concurrently, one thread 
can think that a container is being initialized while it is the other thread 
that initializes it. This is because a global map is used to store the 
container values (which is fine) but to also remember that the initialization 
is in progress.
Comment 1 Jerome Lanneluc CLA 2004-04-08 09:30:04 EDT
Same issue with classpath variable initialization.
Comment 2 Jerome Lanneluc CLA 2004-04-08 09:37:27 EDT
Moved the maps to instance fields, added new maps 
(variableInitializationInProgress and containerInitializationInProgress) to 
hold on the 'initialization in progress' and synchronized the methods 
variableGet(...), variablePut(...), containerGet(...) and containerPut(...)
Comment 3 Frederic Fusier CLA 2004-05-18 11:38:28 EDT
Verified for 3.0 M9 with build I200405180816.