On 2 June 2012 10:28, Stefan Marr <smalltalk@stefan-marr.de> wrote:
Hi Sean:
On 02 Jun 2012, at 05:07, Sean P. DeNigris wrote:
During the process, I noticed that the Blue Book specifies that #fork returns the block itself (pg. 252), while in Pharo it returns the process (see #testFork in the slice). Should our implementation be changed to match the Blue Book?
Why would it be desirable to have the block?
How would you obtain the process object after your change?
by using #newProcess. using the return value of fork provokes you to write incorrect concurrent code. for instance, i found once, some code which assumes that forked process not yet started, or not yet terminated, and people trying to do something with process immediately after issuing #fork.
Having the process directly is useful to do fork/join style operations.
Best regards Stefan
-- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: Â +32 2 629 3525
-- Best regards, Igor Stasenko.