One approach used near the top-level of client and server is to iterate through a closure until it returns "yes I'm done do the next thing", e.g. fetching network input. Another one used slightly further down is to run things for a set amount of time. We could probably merge these two strategies and get better overall behavior with less code.
One approach used near the top-level of client and server is to iterate through a closure until it returns "yes I'm done do the next thing", e.g. fetching network input. Another one used slightly further down is to run things for a set amount of time. We could probably merge these two strategies and get better overall behavior with less code.