declare proc {NewSPort ?S ?SSend} S1 P={NewPort S1} in proc {SSend M} X in {Send P M#X} {Wait X} % wait for the slot to be reserved end thread S={Map S1 fun{$ M#X} X=unit M end} end end