Multitasking is possible?

Alessandro Manunza manunza at elettro1.unica.it
Wed Feb 4 10:34:08 UTC 1998


Hi folks,
	I'm a young Smalltalker and a baby Squeaker. I'd like to run concurrently
two processes. I tried with the method "fork" and "forkAt:" sent to a
Block, obtaining horrible results.
Example1:
If I "do it" on the following lines:
---------------------------
A _ 0.
B _ 0.
[ [A < 50] whileTrue:[
	Transcript show:'AAA';cr.
	B _ B+1.].
] fork.

[ [B < 50] whileTrue:[
	Transcript show:'BBB';cr.
	A _ A+1.].
] fork.
---------------------------
the ProcessorScheduler executes endlessly only the first block without a
stop.

Example2:
If I "do it" on the following lines:
---------------------------
A _ true.
[ [A] whileTrue:[	Transcript show:'AAA';cr.].] fork.
[A _ SelectionMenu confirm: 'Continue?'] whileTrue:[ ].
----------------------------
I can see only the SelectionMenu.

HOW COULD I DO?

	Thank you
	Alessandro





More information about the Squeak-dev mailing list