Add timeout parameter to waiting functions
Functions norns_wait() and nornsctl_wait() now accept an optional const struct timespec *timeout (see nanosleep(2)) to allow users to suspend the calling thread until one of the following occurs: * A signal is delivered and the task has already completed. * The specified time interval has already passed. If timeout is NULL, the functions will suspend the thread for a predefined amount of time and query the server upon waking up. Note that since the server does not allow registering listeners at the moment, the thread will wake only when one of the aforementioned conditions has occurred, even if the task of interest has already finished.
parent
8fe820ad
Please register or sign in to comment