fork download
  1. | que input |
  2. que := SharedQueue new.
  3. input := stdin nextLine subStrings collect: [:each | each asInteger].
  4. input do: [:each |
  5. [(Delay forMilliseconds: each) wait. que nextPut: each] fork
  6. ].
  7. input size timesRepeat: [stdout nextPutAll: que next printString; space]
Success #stdin #stdout 0s 693248KB
stdin
3 1 4 1 5 9 2 6 53 58 97 93 2 38 46 26
stdout
1 1 2 2 3 4 5 6 9 26 38 46 53 58 93 97