madlambda/nash

language: add concurrency support

katcipis opened this issue · 0 comments

Just to now lose the idea that we discussed @tiago4orion what we have until now would be something like:

out1, status1 <=! cmd1
out2, status2 <=! cmd2

$out1 #blocks until cmd1 exits
$status1 #blocks until cmd1 exits

# It may be interesting to have a global wait group function like:
waitall()

One of the key changes is to be able to get the status of processes executing concurrently, that can't be done with the $status magic thing. So we would need a way of get status of different processes.

Syntactically, <=! does not seem very good either. But it seems to be cool to have some way to start concurrent processes and wait for them to finish.