It was also discovered by me. It works, but I expected other
behavior. For example:
MODULE process_probe2;
FROM STextIO IMPORT WriteString, WriteLn;
FROM Processes IMPORT Start, StopMe, Parameter, ProcessId;
FROM libc IMPORT sleep;
VAR
PID1, PID2 : ProcessId;
PROCEDURE P1;
VAR
i: INTEGER;
BEGIN
FOR i := 1 TO 5 DO
WriteString("P1"); WriteLn;
sleep(1);
END;
StopMe();
END P1;
PROCEDURE P2;
VAR
i: INTEGER;
BEGIN
FOR i := 1 TO 5 DO
WriteString("P2"); WriteLn;
sleep(1);
END;
StopMe();
END P2;
BEGIN
Start(P1, 0, 0, NIL, PID1);
Start(P2, 0, 0, NIL, PID2);
END process_probe2.
I expected two processes work parallel.
But they work sequential in same thread. It's doesn't look like `multithreading`. :-)