A Problem: Blocking System Calls
Explore the challenges blocking system calls pose in event-based concurrency models. Understand how blocking calls like reading files in a server can halt the main event loop, causing resource waste, and why event-based systems must avoid such blocking to maintain efficient asynchronous I/O operations.
We'll cover the following...
We'll cover the following...
Thus far, event-based programming sounds great, right? You program a simple loop and handle events as they arise. You don’t even need to think about locking! But there is an issue: what if an event requires that you issue a system call that might block?
For example, imagine a request comes from a client into a server to read a file from ...