Function rc_pthread_timed_join#

Function Documentation#

int rc_pthread_timed_join(pthread_t thread, void **retval, float timeout_sec)#

Joins a thread with timeout given in seconds.

If no timeout is necessary, just use the standard system pthread_join function.

Parameters:
  • thread[in] pthread_t handle

  • retval – place to put the exit status of target thread, see pthread_join

  • timeout_sec[in] floating point timeout in seconds

Returns:

Returns 0 if the thread joined within the timeout period, 1 if the thread timed out and was forced to close, -1 on error.