
After having an interesting discussion with Brendan on the topic of deadlocks in threaded and asynchronous event handling systems (see the comments on
this blog post), I just had something to ask to the developers on OSnews: could you live without blocking API calls? Could you work with APIs where lengthy tasks like writing to a file, sending a signal, doing network I/O, etc is done in a nonblocking fashion, with only callbacks as a mechanism to return results and notify your software when an operation is done?
Member since:
2010-06-08
We've been doing this in Erlang for years. All processes are entirely separate and communicate asynchronously. Synchronized communication can also be achieved by waiting for a response and monitoring the process. All this is already available in the standard library and you just have to write functions like you would in a sequential language, despite everything executing in parallel.