Re: Processes

"[email protected]" <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.gnu.general
Message-ID <[email protected]>
Also if you assign the Process to a variable ('a' below),
you could yield


GNU Smalltalk ready

st> a _ [[true] whileTrue: [
st> (Time now) printNl . 
st> (Delay forSeconds: 1) wait
st> ] 
st> ]fork
18:36:29
Process(nil at userSchedulingPriority, ready to run)

st> [true] whileTrue:[a yield] 
18:37:19
18:37:20
18:37:21

however the most logical modification is to add some wait after the fork,
like in:

[[true] whileTrue: [
	(Time now) printNl . 
	(Delay forSeconds: 1) wait
	] 
]fork.
(Delay forSeconds:10) wait


----- Op 26 jan 2021 om 11:05 schreef Gary Highberger [email protected]:

> Hello Holger!
> 
> The  version of Smalltalk I tested was the one included with Ubuntu 20.04.
> 
> Is the newer, linked to version you're suggesting 3.2.91 by any chance?
> 
> Many thanks,
> 
> Gary
> 
> 
> 
> On Tue, Jan 26, 2021, 2:11 AM Holger Freyther <[email protected]> wrote:
> 
>> Hi Gary!
>>
>> How did you get GNU Smalltalk 3.2.5? On the surface this sounds like a
>> problem already fixed[1] in the development branch of GNU Smalltalk? Could
>> you try to cherry-pick this[1] and see if the problem persists?
>>
>> thank you
>>         holger
>>
>> [1]
>> http://git.savannah.gnu.org/cgit/smalltalk.git/commit/?id=72ada189aba0283c551ead16635c1983968080b8
>>
>>
>> > On 26. Jan 2021, at 10:53, Gary Highberger <[email protected]>
>> wrote:
>> >
>> > Hi Help-Smalltalk,
>> >
>> > If processes aren't supported in 3.2.5 then read no further :-)
>> >
>> > Forks or Delays might be broken in 3.2.5. I totally hope I'm wrong or
>> that
>> > there's a clean workaround.
>> >
>> > For what I can tell, Forked* infinite loop processes containing a Delay
>> > won't run.*
>> >
>> > Links to two Smalltalk programs based on an infinite loop, Delay, fork,
>> > example from the Bluebook follow:
>> >
>> > https://www.dropbox.com/s/rs4iobnhh6vzmc4/tst.st?dl=0
>> >
>> > https://www.dropbox.com/s/0zybbef44e45w3c/tstX.st?dl=0
>> >
>> > At the Linux prompt enter gst tst.st to observe desired behavior.
>> >
>> > At the Linux prompt enter gst tstX.st to see the failed fork behavior.
>> >
>> > Any help you can provide will be greatly appreciated!
>> >
>> > Thank you,
>> >
>> > Gary Highberger
>>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.