qdbplang / qdbp

MIT License
51 stars 1 forks source link

Concurrency #33

Closed dghosef closed 3 months ago

dghosef commented 1 year ago

qdbp should become threadsafe at some point. This means

dghosef commented 1 year ago

Use CSP with unbuffered channels. The only problem is if thread exits prematurely, we will leak memory. Run the garbage whenever we prematurely exit a thread and whenever the heap gets too big. This should happen rarely enough that it is ok.

dghosef commented 1 year ago

Channels should be able to be declared at the top of the program and have the following operations:

Send and Receive are blocking operations. Duplicated channels have the same type as the original channel

dghosef commented 1 year ago

Functions run in parallel should return a struct that has a >>= method and an Await method

dghosef commented 1 year ago

We need a syntax for making CSP channels

dghosef commented 1 year ago

We need a way to kill a thread halfway without killing the whole app

dghosef commented 1 year ago

Should channels be the way in which we do I/O? I think it makes a lot of sense

dghosef commented 3 months ago

No channels. Instead, just use MVU and have "cooperative-ish" concurrency