|
NAMEchoose - performs one of multiple channel operationsSYNOPSIS
DESCRIPTIONAccepts a list of channel operations. Performs one that can be done first. If multiple operations can be done immediately, the one that comes earlier in the array is executed.clauses: Operations to choose from. See below. nclauses: Number of clauses. deadline: A point in time when the operation should time out, in milliseconds. Use the now function to get your current point in time. 0 means immediate timeout, i.e., perform the operation if possible or return without blocking if not. -1 means no deadline, i.e., the call will block forever if the operation cannot be performed. The fields in chclause structure are as follows:
RETURN VALUEIn case of success the function returns index of the clause that caused the function to exit. In case of error it returns -1 and sets errno to one of the values below.Even if an index is returned, errno may still be set to an error value. The operation was successfull only if errno is set to zero. ERRORS
Additionally, if the function returns an index it can set errno to one of the following values:
EXAMPLE
SEE ALSOchdone(3) chmake(3) chmake_mem(3) chrecv(3) chsend(3) now(3)
Visit the GSP FreeBSD Man Page Interface. |