diff --git a/src/libCom/pool/epicsThreadPool.h b/src/libCom/pool/epicsThreadPool.h index e41dd3653..2bb176dec 100644 --- a/src/libCom/pool/epicsThreadPool.h +++ b/src/libCom/pool/epicsThreadPool.h @@ -81,8 +81,8 @@ epicsShareFunc void epicsThreadPoolControl(epicsThreadPool* pool, /* Block until job queue is emptied and no jobs are running. * Useful after calling epicsThreadPoolControl() with option epicsThreadPoolQueueAdd=0 * - * timeout<0 waits forever, timeout==0 polls, timeout>0 waits for a fixed time - * Returns 1 for timeout, 0 for success, >1 on errors + * timeout<0 waits forever, timeout==0 polls, timeout>0 waits at most one timeout period + * Returns 0 for success or non-zero on error (timeout is ETIMEOUT) */ epicsShareFunc int epicsThreadPoolWait(epicsThreadPool* pool, double timeout); diff --git a/src/libCom/pool/threadPool.c b/src/libCom/pool/threadPool.c index ccdc7f2b1..1cfc0e88b 100644 --- a/src/libCom/pool/threadPool.c +++ b/src/libCom/pool/threadPool.c @@ -170,7 +170,7 @@ int epicsThreadPoolWait(epicsThreadPool* pool, double timeout) cantProceed("epicsThreadPoolWait: failed to wait for Event"); break; case epicsEventWaitTimeout: - ret=EWOULDBLOCK; + ret=ETIMEDOUT; break; case epicsEventWaitOK: ret=0;