Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006853 [Croquet] Any minor have not tried 01-14-08 00:25 01-14-08 00:25
Reporter georgkoester View Status public  
Assigned To
Priority normal Resolution open  
Status new  
Summary 0006853: TFarRef has a race which may lead to non-execution of a whenResolved: block.
Description This is a race:
(concModifiedCond) ifTrue ^ block value.
"set up execution of block for the event of concModifiedCond becoming true"
executeLaterForConModifiedCond block.

Problem: if concModifiedCond is changed after ifTrue checked and before executeLater installs the block, then the block will never run.

Look at TFarRef>>whenResolved:
        self isResolved ifTrue:[
        aBlock numArgs = 0 ifTrue:[^aBlock value].
        aBlock numArgs = 1 ifTrue:[^aBlock value: self].
    ].

    script := self island runScript:[
        aBlock numArgs = 0 ifTrue:[aBlock value].
        
                aBlock numArgs = 1 ifTrue:[aBlock value: self].
        self island stopScript: script.

    ] when: {self island. myName asSymbol}.


This file also fixes usage of Semaphore in TFarRef>>waitTimeoutMSecs caused by missing wait on Semaphore (See my report on the same Problem in TPromise).
Additional Information Fix is proposed with TFarRef.st

Tested locally by executing Croquet with this code. Class seems to need lots of modifications to Unit-test - so none written. Can do so if modification of this scale make sense to the investigator.
Attached Files  TFarRef.st [^] (12,875 bytes) 01-14-08 00:25

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
01-14-08 00:25 georgkoester New Issue
01-14-08 00:25 georgkoester File Added: TFarRef.st


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