multi-threaded squeak

Bert Freudenberg bert at isg.cs.uni-magdeburg.de
Sun Jun 17 10:10:15 UTC 2001


On Sun, 17 Jun 2001, Daniel Parnell wrote:

> G'day All,
>
> 	does the Squeak VM support threads?

Yes, but they're called processes, which might be slightly confusing. Try
"ProcessBrowser open" to see what processes are running in your image. The
scheduling is done in Squeak to be independend of the OS.

> If so, how are they used?

You can fork off any block by sending it #fork. For example:

	[10 timesRepeat:
		[Transcript cr; show: 'Squeak!'.
		(Delay forSeconds: 1) wait]
	] fork

You can give a priority using #forkAt:. See classes Process and
ProcessorScheduler.

-- Bert





More information about the Squeak-dev mailing list