[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-smalltalk] Process & Fork
From: |
Quenio dos Santos |
Subject: |
[Help-smalltalk] Process & Fork |
Date: |
Sat, 20 Jul 2019 10:36:58 -0300 |
Hello,
I'm running the following program with two simple processes (the main one
and a forked process):
[
| i |
i := 0.
[ true ] whileTrue: [
i := i + 1.
i displayNl.
(Delay forSeconds: 1) wait
]
] fork.
[ true ] whileTrue: [
Processor yield
]
I was expecting these two processes to run indefinitely, but the program
hangs after printing a few lines:
1
2
3
And then I have to interrupt it.
I'm wondering if there's something basic I'm missing here. Maybe I don't
understand how "Process yield" works, but I thought it was just going to
suspend the current process and let the forked process run.
Any help is appreciated,
Quenio
- [Help-smalltalk] Process & Fork,
Quenio dos Santos <=
- Re: [Help-smalltalk] Process & Fork, Holger Freyther, 2019/07/20
- Re: [Help-smalltalk] Process & Fork, Quenio dos Santos, 2019/07/20
- Re: [Help-smalltalk] Process & Fork, Holger Freyther, 2019/07/22
- Re: [Help-smalltalk] Process & Fork, Quenio dos Santos, 2019/07/22
- Re: [Help-smalltalk] Process & Fork, Holger Freyther, 2019/07/23
- Re: [Help-smalltalk] Process & Fork, Quenio dos Santos, 2019/07/26
- Re: [Help-smalltalk] Process & Fork, Holger Freyther, 2019/07/26
- Re: [Help-smalltalk] Process & Fork, Quenio dos Santos, 2019/07/26
Re: [Help-smalltalk] Process & Fork, Tommy Pettersson, 2019/07/20