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 > > session > ^ 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: ProcessTest>>testFaithfulTerminate "Ensure that we have process-faithful termination and unwind" | p | p := [ [Semaphore new wait] ensure:[self assert: Processor activeProcess == p]. ] forkAt: Processor activePriority + 1. p terminate. This test passes fine in our images that have the process-faithful debugging fixes. Cheers, - Andreas |
In reply to this post by Andreas.Raab
Em 08-11-2010 17:23, Andreas Raab escreveu:
> Try it now. The method directoryContentsFor:do: was added to 4.2 and > created a conflict when loading TweakCore. I've removed it from Tweak > so hopefully it will work now. > > Cheers, > - Andreas Ok. Installed by hand (all latest). It complains about CProjectBuilder & other stuff. |
In reply to this post by Andreas.Raab
On 9 November 2010 19:07, Andreas Raab <[hidden email]> wrote:
> 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 >> >> session >> ^ 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: > > ProcessTest>>testFaithfulTerminate > "Ensure that we have process-faithful termination and unwind" > > | p | > p := [ > [Semaphore new wait] ensure:[self assert: Processor > activeProcess == p]. > ] forkAt: Processor activePriority + 1. > p terminate. > > This test passes fine in our images that have the process-faithful debugging > fixes. > Yeah, that's great. During unwinding, code should be run in same environment where it expected to run, otherwise problems is unavoidable. > Cheers, > - Andreas > -- Best regards, Igor Stasenko AKA sig. |
In reply to this post by CdAB63
On 11/9/2010 11:41 AM, Casimiro de Almeida Barreto wrote:
> Em 08-11-2010 17:23, Andreas Raab escreveu: >> Try it now. The method directoryContentsFor:do: was added to 4.2 and >> created a conflict when loading TweakCore. I've removed it from Tweak >> so hopefully it will work now. >> >> Cheers, >> - Andreas > Ok. Installed by hand (all latest). It complains about CProjectBuilder& > other stuff. Well, it is Tweak->Core<- meaning only the essential parts of the API. Try evaluating CProjectMorph open: CSampleApp. to see a simple example. Cheers, - Andreas |
Evaluating
MCMcmUpdater updateFromRepositories: #( 'http://squeaksource.com/TweakCore' 'http://squeaksource.com/TweakExtras' ). Updating starts but after some time I get a walkback (DirectoryEntry fromArray: entryArray) #fromArray is not understood This is in Squeak 4.2alpha-10656 (as of now) --Hannes On 11/9/10, Andreas Raab <[hidden email]> wrote: > On 11/9/2010 11:41 AM, Casimiro de Almeida Barreto wrote: >> Em 08-11-2010 17:23, Andreas Raab escreveu: >>> Try it now. The method directoryContentsFor:do: was added to 4.2 and >>> created a conflict when loading TweakCore. I've removed it from Tweak >>> so hopefully it will work now. >>> >>> Cheers, >>> - Andreas >> Ok. Installed by hand (all latest). It complains about CProjectBuilder& >> other stuff. > > Well, it is Tweak->Core<- meaning only the essential parts of the API. > Try evaluating > > CProjectMorph open: CSampleApp. > > to see a simple example. > > Cheers, > - Andreas > > |
Free forum by Nabble | Edit this page |