formalize relinquishing the thread to perform RPCs on
(Thought I'd give gitlab issues a try...)
Currently, the example creates and waits on an eventual for shutting down, in effect giving up the thread. The way it's set up, noone has access to the eventual though, so ctrl-c is the only option ;). It would be good to have formalized shutdown semantics so that the system can exit cleanly (e.g., when a database is closed). Not sure whether that would take the form of a shutdown RPC that sets the eventual (I've been using this method in my mercury examples for simplicity), or some other method (doesn't look like there are any "timed waits" in argobots). The function prototype for at least entering the loop could be something like
int margo_listen(int seconds), where the return value is whether the instance has been told to shut down.