Re: Process & Fork
Quenio dos Santos <[email protected]>
| Newsgroups | gmane.comp.lang.smalltalk.gnu.general |
|---|---|
| Message-ID | <CAJ6rE1zyeCyJssDR0CRJVXD6smmh0NhmmpLX8TBLYG=8LheDWw@mail.gmail.com> |
Thanks for the explanation, Tommy. I did try it with a delay instead of yielding in the main process, but got the same hanging behavior. I was looking at the implementation of Delay, and suspect the non-synchronized queue used there might be causing this problem. On Sat, 20 Jul 2019 at 17:35 Tommy Pettersson <[email protected]> wrote: > Hi Quenio, > > I can't speak for GNU Smalltalk, but yield in general is a tricky business, > and does often not mean what one might think. A good way of thinking of > yield is: "Hi scheduler, I'm not done yet, but if you have something > important to do, I will yield now". In particular, yield MAY be a no-op, so > never put it in a busy-wait loop. > > Anyways, puting a delay in the main process makes the two processes take > turns on the cpu. This may be a bug, a feature, or per design, I have > really no idea. Just don't ever put yield in a busy-wait loop, and > everyone will be fine. :-) > > /Tommy > > _______________________________________________ > help-smalltalk mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/help-smalltalk > _______________________________________________ help-smalltalk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-smalltalk