[squeak-dev] Re: Process-specific state broken and uncomplete
andreas.raab at gmx.de
Tue Nov 9 17:07:31 UTC 2010
On 11/8/2010 7:39 PM, Igor Stasenko wrote:
> Suppose you have a domain object which provides following ways to
> access the session:
> session: forkedSession
> Processor activeProcess environmentAt: #session put: forkedSession
> ^ Processor activeProcess environmentAt: #session
> now, here what i'd like to write:
> | session |
> session := MySession new .
> session initialize blabla.
> "good fork"
> good := [
> self session: session.
> [ self process stuff ] ensure: [ session close ]
> ] newProcess.
> good resume.
> 1 minute asDelay wait.
> good terminate.
> self assert: (session isClosed).
You'll be happy to hear that Eliot's fixes address this very problem. I
just wrote a simple test to illustrate the issue more clearly:
"Ensure that we have process-faithful termination and unwind"
| p |
p := [
[Semaphore new wait] ensure:[self assert: Processor activeProcess == p].
] forkAt: Processor activePriority + 1.
This test passes fine in our images that have the process-faithful
More information about the Squeak-dev