Need to copy a suspended process
Hruby Martin
hrubym at fit.vutbr.cz
Fri Dec 17 16:57:16 UTC 2004
Hello
I've spent a lot of time trying to solve this problem:
I declare a class "MSprocess" with a "thr" instance variable. "thr" refers
a process:
thr := [ self behavior. ] newProcess.
And now: objects made of "MSprocess" do their activity and their stacks
grows and so on. In certain moment, I want to clone them all, so that for
every object "o" with class=MSprocess I need:
1) copy of that object with shallow copy of its attributes - "objcopy :=
o copy"
2) a absolutely independent clone "thrclone" of "o thr", where all
references to "o" must be replaced with "objcopy" including other
important receivers, senders, homes and etc.
3) both processes must be separated - interpreting of "thr" should not
effect "thrclone"
4) all levels of context in "thrclone" refers context of "objcopy"
5) it would be nice to clone also the local variables, but that is not as
necessary
would you please advise?
thank you
Martin
More information about the Squeak-dev
mailing list
|