[squeak-dev] Alternate BlockContext>>forkAt: for Andreas, was #fork and deterministic resumption of the resulting process

Igor Stasenko siguctua at gmail.com
Sun Mar 2 19:09:59 UTC 2008


Allow me to add my suggestion, which i hope will let you sleep at nights :)

  BlockContext>>forkAt: priority
         "Create and schedule a Process running the code in the receiver
                 at the given priority. Answer nil."

         | forkedProcess |
         forkedProcess := self newProcess.
         forkedProcess priority: priority.
         forkedProcess resume.
         ^ nil

  BlockContext>>fork
	"Create and schedule a Process running the code in the receiver."
	self newProcess resume.
        ^ nil

These changes will stop forks from being used in wrong manner and
effectively eliminate the problem of "letting fork initiator process
to run little bit more to assign returned value anywhere".

-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list