10 ms·
I've been working on a multithreaded interpreter language which uses a lockfree algorithm to communicate. I also have a buggy incomplete implementation of runt
by samsquire 4y ago
I've been working on a multithreaded interpreter language which uses a lockfree algorithm to communicate.
I also have a buggy incomplete implementation of runtime reference passing.
The idea is that you request access to some data and then receive a reference that you can read or write to then you pass the reference to the next requester.
In theory everyone can read at the same time and writers can run sequentially. And alternate between reading and writing. This should prevent data races.
I want to avoid contention and blocking and synchronization cost and complexity. I think the compiler can generate thread safe code with the right design but it is not trivially easy.