Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix aws_thread and aws_condition_variable header doc #580

Closed
nchong-at-aws opened this issue Jan 23, 2020 · 1 comment · Fixed by #1157
Closed

Fix aws_thread and aws_condition_variable header doc #580

nchong-at-aws opened this issue Jan 23, 2020 · 1 comment · Fixed by #1157
Labels
documentation This is a problem with documentation. p3 This is a minor priority issue

Comments

@nchong-at-aws
Copy link
Contributor

nchong-at-aws commented Jan 23, 2020

  1. In thread.h the doc for aws_thread_clean_up currently 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:

  1. The docs for aws_condition_variable_wait, aws_condition_variable_wait_pred, aws_condition_variable_wait_for, and aws_condition_variable_wait_for_pred should note that the function must be called with the mutex locked by the calling thread otherwise the behavior is undefined.

  2. Additionally, the docs for aws_condition_variable_wait and aws_condition_variable_wait_for should 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 _pred versions of these functions or re-test the condition explicitly.

@nchong-at-aws nchong-at-aws added the documentation This is a problem with documentation. label Jan 23, 2020
@nchong-at-aws nchong-at-aws changed the title Fix out-of-date aws_thread_clean_up doc Fix aws_thread header doc Jan 23, 2020
@nchong-at-aws nchong-at-aws changed the title Fix aws_thread header doc Fix aws_thread and aws_condition_variable header doc Jan 23, 2020
@jmklix jmklix added the p3 This is a minor priority issue label Sep 6, 2023
@jmklix
Copy link
Member

jmklix commented Oct 14, 2024

  1. Fixed with this PR: Part 1 of aws_thread_clean_up fix and contract clarification #814
    2 & 3 will be fixed with this PR: improve condition_variable documentation

@jmklix jmklix linked a pull request Oct 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation. p3 This is a minor priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants