On 18 October 2010 21:04, Eliot Miranda <[email protected]> wrote:
>
>
> On Mon, Oct 18, 2010 at 5:07 AM, Igor Stasenko <[email protected]> wrote:
>>
>> On 18 October 2010 14:55, nullPointer <[email protected]> wrote:
>> >
>> > Now works :|
>> >
>>
>> yes, but probably you found a Cog issue.
>
> What's the definition for BlockClosure>>newProcessWith: ?

In Pharo it is:

newProcessWith: anArray
        "Answer a Process running the code in the receiver. The receiver's block
        arguments are bound to the contents of the argument, anArray. The
        process is not scheduled."
        <primitive: 19> "Simulation guard"
        ^Process
                forContext:
                        [self valueWithArguments: anArray.
                        Processor terminateActive] asContext
                priority: Processor activePriority


In Squeak, this method is missing in BlockClosure, and exists only for
BlockContext.

> TIA
> Eliot
>
>>
>> >
>> > pvtStartProcess
>> >
>> >        internalProcess := [ self pvtCallProcess: self] fork.
>> >
>> >
>> >
>> > pvtGetNewProcessBlock
>> >
>> >        ^[:timer || intervalDelay |
>> >
>> >                [timer enabled] whileTrue:[
>> >
>> >                        (Delay forMilliseconds: timer interval) wait.
>> >
>> >                        timer enabled ifTrue:[
>> >
>> >                                timer raiseOnElapsedTimeForProcessThread:
>> > (timer getProcess).
>> >
>> >                                WorldState addDeferredUIMessage:[
>> >                                        timer
>> > raiseOnElapsedTimeForUIThread: (timer getProcess)
>> >                                ].
>> >                        ]
>> >                ].
>> >        ].
>> >
>> >
>> >
>> > pvtCallProcess: oneParam
>> >
>> >        | processBlock |
>> >
>> >        processBlock := self pvtGetNewProcessBlock.
>> >        processBlock value: oneParam.
>> >
>> >
>> > Anyway I understand than the other way must be go. Something I did bad.
>> >
>> > Many thanks for the help
>> >
>> >
>> > --
>> > View this message in context:
>> > http://forum.world.st/Implementing-a-Timer-newProcessWith-anArray-fails-tp2999831p3000083.html
>> > Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>> >
>> > _______________________________________________
>> > Pharo-project mailing list
>> > [email protected]
>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>> >
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>
>



-- 
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to