Skip to content

lib: make curlx_wait_ms() and use it #17641

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

Closed
wants to merge 15 commits into from
Closed

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Jun 16, 2025

Move function to curlx/, change all callers.

Also:

  • src: replace local implementation.
  • tests/client: replace local ad-hoc sleep code.
  • tests/libtest: replace local wait_ms() implementation.
  • lib1531: replace local ad-hoc sleep code.
  • tests/server: replace local, simplified copy.
  • tests/server: formatting, drop some unused headers.

  • libtests select_wrapper() has special Sleep() code for Windows, suggesting
    select() is called from places to trigger a wait. Which callers may be doing that? (the first arg, int nfds == 0)
    Ref: e134a40
    I don't know → SKIP in this PR.
  • libtests also has its local wait_ms(). It's wrapping select()
    into an error handling macro, otherwise it's a simpler version
    of curlx_wait_ms(). Change it to the latter? [DONE]
    The libtest-specific select wrapper is gone from wait_ms with this. Was it necessary there? → The code suggest that it was not. select_wrapper() was dealing with Windows (USE_WINSOCK) the same way wait_ms already handled on its own.
  • clients: ws_data, ws_pingpong: make them use curlx_wait_ms().
  • split off: clients: hook up curl_setup.h and curlx (for fopen). fix printf fallouts. → tests/http/clients: drop hack and use curl_setup.h again #17642

@github-actions github-actions bot added the tests label Jun 16, 2025
@vszakats vszakats changed the title lib: make curlx_wait_ms() lib: make curlx_wait_ms(), use it Jun 16, 2025
@vszakats vszakats changed the title lib: make curlx_wait_ms(), use it lib: make curlx_wait_ms(), use it Jun 16, 2025
@vszakats vszakats force-pushed the s-tidy branch 3 times, most recently from 0821651 to 3fa41fd Compare June 16, 2025 21:52
@vszakats vszakats changed the title lib: make curlx_wait_ms(), use it lib: make curlx_wait_ms() and use it Jun 17, 2025
@vszakats vszakats force-pushed the s-tidy branch 2 times, most recently from a7afb38 to 01131b0 Compare June 19, 2025 07:14
@vszakats vszakats closed this in 35d0c04 Jun 19, 2025
@vszakats vszakats deleted the s-tidy branch June 19, 2025 13:59
denandz pushed a commit to denandz/curl that referenced this pull request Jun 21, 2025
Move function to curlx/, change all callers.

Also:
- src: replace local implementation.
- tests/client: replace local ad-hoc sleep code.
- tests/libtest: replace local `wait_ms()` implementation.
- lib1531: replace local ad-hoc sleep code.
- tests/server: replace local, simplified copy.
- tests/server: formatting, drop some unused headers.

Closes curl#17641
vszakats added a commit to vszakats/curl that referenced this pull request Jun 23, 2025
vszakats added a commit to vszakats/curl that referenced this pull request Jun 23, 2025
vszakats added a commit that referenced this pull request Jun 23, 2025
@vszakats vszakats mentioned this pull request Jun 23, 2025
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant