[BUG] Processor activeProcess returns "a Process in nil"
Bob Arning
arning at charm.net
Thu Mar 22 20:31:17 UTC 2001
On Thu, 22 Mar 2001 12:15:47 -0800 Ned Konz <ned at bike-nomad.com> wrote:
>> >Unfortunately, this breaks:
>> > MessageTally spyOnProcess: Processor activeProcess forMilliseconds: 4000
>> >which I'm using in the ProcessBrowser...
>>
>> How so? Looks like it's working here.
>
>I get a "message not understood: receiver" when I evaluate
> MessageTally spyOnProcess: Processor activeProcess forMilliseconds: 4000
>in a workspace.
>It contains code like:
> aProcess suspendedContext receiver
>which blows up.
Ah, yes.
well, if you rearrange things like this:
...
Timer _ [
self
class: aProcess suspendedContext receiver class
method: aProcess suspendedContext method.
[...] whileTrue.
sem signal]
forkAt: (ObservedProcess priority + 1 min: Processor highestPriority).
"activate the probe and wait for it to finish"
sem wait.
time _ Time millisecondClockValue - time0
then it will work. However, I'm not sure the example make a lot of sense since the
sem wait
is going to hang the process which is being monitored until the monitoring is complete.
Cheers,
Bob
More information about the Squeak-dev
mailing list
|