Need to copy a suspended process
hrubym at fit.vutbr.cz
Fri Dec 17 16:57:16 UTC 2004
I've spent a lot of time trying to solve this problem:
I declare a class "MSprocess" with a "thr" instance variable. "thr" refers
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 :=
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
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
would you please advise?
More information about the Squeak-dev