Skip to content

Tweak nolock function descriptions #5015

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

Merged

Conversation

Rageking8
Copy link
Contributor

@Rageking8 Rageking8 commented Apr 10, 2024

The wording "locking the thread" seems a little off since it should either be "locking the stream" or some other "item". Omitting the "item" being locked seems to work the best at the expense of being less "specific" (as compared to using the phrase "locking the stream" etc). The large majority of locking for the normal analog of _nolock APIs are done via _lock_file with a FILE* for the stream, with some others being done via __acrt_lock with __acrt_conio_lock of type __acrt_lock_id (both locking functions are implemented using EnterCriticalSection) (the term "locking the stream" cannot be used for all _nolock APIs). Hence, using the generic term "without locking" for all applicable _nolock APIs make things uniform and the idea of "not locking" is decently conveyed.

@TylerMSFT Does this sound like an improvement? Happy to hear some feedback.

Note 1) Some descriptions (e.g. _fseek_nolock) are identical to their normal analog, therefore the notion of "not locking" is added.

Note 2) The descriptions of _getdcwd_nolock and _wgetdcwd_nolock are not modified as they are just macros to the normal analog.

Copy link
Contributor

@Rageking8 : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Copy link
Contributor

Learn Build status updates of commit 3796953:

✅ Validation status: passed

File Status Preview URL Details
docs/c-runtime-library/reference/fclose-nolock.md ✅Succeeded
docs/c-runtime-library/reference/fflush-nolock.md ✅Succeeded
docs/c-runtime-library/reference/fgetc-nolock-fgetwc-nolock.md ✅Succeeded
docs/c-runtime-library/reference/fputc-nolock-fputwc-nolock.md ✅Succeeded
docs/c-runtime-library/reference/fread-nolock.md ✅Succeeded
docs/c-runtime-library/reference/fread-nolock-s2.md ✅Succeeded
docs/c-runtime-library/reference/fseek-nolock-fseeki64-nolock.md ✅Succeeded
docs/c-runtime-library/reference/ftell-nolock-ftelli64-nolock.md ✅Succeeded
docs/c-runtime-library/reference/fwrite-nolock.md ✅Succeeded
docs/c-runtime-library/reference/getchar-nolock-getwchar-nolock.md ✅Succeeded
docs/c-runtime-library/reference/getche-nolock-getwche-nolock.md ✅Succeeded
docs/c-runtime-library/reference/getch-nolock-getwch-nolock.md ✅Succeeded
docs/c-runtime-library/reference/getc-nolock-getwc-nolock.md ✅Succeeded
docs/c-runtime-library/reference/getdcwd-nolock-wgetdcwd-nolock.md ✅Succeeded
docs/c-runtime-library/reference/putchar-nolock-putwchar-nolock.md ✅Succeeded
docs/c-runtime-library/reference/putch-nolock-putwch-nolock.md ✅Succeeded
docs/c-runtime-library/reference/putc-nolock-putwc-nolock.md ✅Succeeded
docs/c-runtime-library/reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md ✅Succeeded
docs/c-runtime-library/reference/ungetc-nolock-ungetwc-nolock.md ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

PRMerger Results

Issue Description
Changed Files This PR contains more than 10 changed files.

Copy link
Contributor

Learn Build status updates of commit f5a3d28:

✅ Validation status: passed

File Status Preview URL Details
docs/c-runtime-library/reference/fclose-nolock.md ✅Succeeded
docs/c-runtime-library/reference/fflush-nolock.md ✅Succeeded
docs/c-runtime-library/reference/fgetc-nolock-fgetwc-nolock.md ✅Succeeded
docs/c-runtime-library/reference/fputc-nolock-fputwc-nolock.md ✅Succeeded
docs/c-runtime-library/reference/fread-nolock.md ✅Succeeded
docs/c-runtime-library/reference/fread-nolock-s2.md ✅Succeeded
docs/c-runtime-library/reference/fseek-nolock-fseeki64-nolock.md ✅Succeeded
docs/c-runtime-library/reference/ftell-nolock-ftelli64-nolock.md ✅Succeeded
docs/c-runtime-library/reference/fwrite-nolock.md ✅Succeeded
docs/c-runtime-library/reference/getchar-nolock-getwchar-nolock.md ✅Succeeded
docs/c-runtime-library/reference/getche-nolock-getwche-nolock.md ✅Succeeded
docs/c-runtime-library/reference/getch-nolock-getwch-nolock.md ✅Succeeded
docs/c-runtime-library/reference/getc-nolock-getwc-nolock.md ✅Succeeded
docs/c-runtime-library/reference/getdcwd-nolock-wgetdcwd-nolock.md ✅Succeeded
docs/c-runtime-library/reference/putchar-nolock-putwchar-nolock.md ✅Succeeded
docs/c-runtime-library/reference/putch-nolock-putwch-nolock.md ✅Succeeded
docs/c-runtime-library/reference/putc-nolock-putwc-nolock.md ✅Succeeded
docs/c-runtime-library/reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md ✅Succeeded
docs/c-runtime-library/reference/ungetc-nolock-ungetwc-nolock.md ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

PRMerger Results

Issue Description
Changed Files This PR contains more than 10 changed files.

@@ -11,7 +11,7 @@ helpviewer_keywords: ["_ungetch function", "ungetwch function", "characters, pus
---
# `_ungetch`, `_ungetwch`, `_ungetch_nolock`, `_ungetwch_nolock`

Pushes back the last character that's read from the console without locking.
Pushes back the last character that's read from the console.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted the addition of "without locking" as this article holds both normal and nolock variants of ungetch.

@Court72
Copy link
Contributor

Court72 commented Apr 10, 2024

@TylerMSFT

Can you review the proposed changes?

When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator bot added the aq-pr-triaged Tracking label for the PR review team label Apr 10, 2024
Copy link
Collaborator

@TylerMSFT TylerMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you. I think this is an improvement and that being less prescriptive about what exactly is being locked is clearer. Developers will know what locking means in this content.
Thank you for these updates.

@TylerMSFT
Copy link
Collaborator

#sign-off

@Court72 Court72 merged commit 0680329 into MicrosoftDocs:main Apr 11, 2024
@Rageking8 Rageking8 deleted the tweak-nolock-function-descriptions branch April 12, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants