This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 81601 - Threading problem with ConfigurationStorage.saveInProgress
Summary: Threading problem with ConfigurationStorage.saveInProgress
Status: RESOLVED WONTFIX
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: PC All
: P4 blocker (vote)
Assignee: _ pcw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-01 13:58 UTC by _ rkubacki
Modified: 2008-06-24 07:00 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2006-08-01 13:58:07 UTC
This pattern is wrong with existing memory model in Java because there is no
guarantee that method b() executed in different thread than a() will see a's
updates:

class A
 int i = 0;
 ...
 a() {
  i++;
  ...
  i--;
 } 
 b() {
  if (i>0) return;
  ...
 }
}
Comment 1 _ pcw 2008-04-25 20:15:18 UTC
1) Agree with general assessment.  Variable should be volatile to protect against this.

2) For this particular block of code, IIRC it is actually protecting itself within the context of a single thread (e.g
recursion issues) so the general assessment does not apply (ie the described scenario does not happen in real life).

3) This code is dead (removal is pending) so the bug is irrelevant regardless.
Comment 2 _ pcw 2008-06-24 07:00:21 UTC
Code line no longer used, marking WONTFIX.