Fix aws_thread and aws_condition_variable header doc
- In
thread.hthe doc foraws_thread_clean_upcurrently reads:
/**
* Cleans up the thread handle. Either detach or join must be called
* before calling this function.
*/
But the function itself detaches the thread (if it is currently running). There is no function to detach a thread and calling aws_thread_join before this function makes it a no-op.
In condition_variable.h:
-
The docs for
aws_condition_variable_wait,aws_condition_variable_wait_pred,aws_condition_variable_wait_for, andaws_condition_variable_wait_for_predshould note that the function must be called with the mutex locked by the calling thread otherwise the behavior is undefined. -
Additionally, the docs for
aws_condition_variable_waitandaws_condition_variable_wait_forshould note that spurious wakeups can occur: i.e., the return of the function does not apply anything about the wakeup condition associated with the variable. To avoid this problem the user can use the_predversions of these functions or re-test the condition explicitly.