Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006855 [Croquet] Any minor have not tried 01-14-08 01:14 01-14-08 01:15
Reporter georgkoester View Status public  
Assigned To
Priority normal Resolution open  
Status new  
Summary 0006855: Races in TPromise resolver handling.
Description 1st:
Double execution possible in whenComplete because resolver is set and then executed if isResolved is true, presuming that this would mean that isResolved was already true before resolver was set. Error: resolving might have happened between setting resolver and testing again.

2nd:
Resolver might not get executed because in onResolved between ifNotNil checking and resolved assignment whenComplete might be executed, so that whenComplete sees resolved == false and doesn't execute the block, when in fact onResolved is past checking and will assign resolved := true without checking again for a resolver. So the resolver won't be executed.
 
Additional Information Reported another issue with TPromise separately in http://bugs.squeak.org/view.php?id=6854 [^]

Proposed fix in supplied files.

The files supplied contain the fixes for 6854.
Attached Files  TPromise.st [^] (4,411 bytes) 01-14-08 01:14
 TPromiseTest.st [^] (1,161 bytes) 01-14-08 01:15

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
01-14-08 01:14 georgkoester New Issue
01-14-08 01:14 georgkoester File Added: TPromise.st
01-14-08 01:15 georgkoester File Added: TPromiseTest.st


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
31 total queries executed.
24 unique queries executed.
Powered by Mantis Bugtracker