Concurrency

From Adam Colton
Jump to navigation Jump to search

Concurrency

Like Go, any function can be executed concurrently.

 go foo()

However, Go tends to rely on channels for syncronization. I'd like to allow return values

 a := go foo(1)
 b := go foo(2)
 c := go foo(3)
 return a+b+c

This will wait for all three to return before running "a+b+c".

Wait

A thread can wait for some condition. The condition must be an immutable action.

 wait(x == 20)

Priority

When starting a thread, it can have a priority. The catch is that most of the time we don't want this. So I think it's something that can be set on the runtime during compilation.