[Vm-dev] Re: [squeak-dev] Bug whith contextOn:do:
Eliot Miranda
eliot.miranda at gmail.com
Wed Apr 1 18:51:18 UTC 2015
On Wed, Apr 1, 2015 at 9:49 AM, Tobias Pape <Das.Linux at gmx.de> wrote:
>
> On 01.04.2015, at 18:37, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>
> > On Wed, Apr 1, 2015 at 6:27 AM, Bert Freudenberg <bert at freudenbergs.de>
> wrote:
> >
> > On 31.03.2015, at 23:10, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> >>
> >> I'm not sure the other ways are any better. The way to transfer to a
> context without disturbing its stack is to do a process switch.
> >> [...]
> >> One of the advantages the process switch versions have is in not
> updating the receiving context sp there's a chance the context-to-stack
> mapping machinery won't flush the context to the heap. In the end it might
> actually be faster.
> >
> > I would find it very surprising if #jump would result in the execution
> continuing in a different process.
> >
> > That's not what they do. Instead they spawn another process to position
> the process in which we want to jump correctly.
>
> We don't want to jump to a process but within a process, like a goto…
>
Well, jump doesn't do unwinds so the code should be simply:
jump
"Abandon thisContext and resume self instead (using the same current
process)."
| process |
process := Processor activeProcess.
[process suspendedContext: self] fork.
Processor yield
What about thread/process-local variables?
>
Happy now?
--
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150401/c1f21b63/attachment.htm
More information about the Squeak-dev
mailing list
|