Skip to content

uv__threadpool_cleanup non-op on Windows? #2980

Closed

Description

@jasnell

In Node.js, it looks like we've had a long standing bug when running threadpool jobs. See nodejs/node#35021 for discussion. Calling uv_library_shutdown() resolves the problem on non-Windows systems by ensuring that threadpool jobs are shutdown properly. However, I notice that uv__threadpool_cleanup() is currently a non-op on _WIN32 and it's not entirely clear why.

Removing the #ifndef _WIN guards in uv__threadpool_cleanup() fixes the bug for me locally (Windows 10, VS19). I can open a PR but before I do I wanted to see if there was a specific reason the function was a made a non-op.

/cc @bnoordhuis @cjihrig @addaleax

Activity

  1. addaleax commented on Sep 2, 2020

    @addaleax
    Contributor

    c8abb29 changed this in 2014, but since we’re using __attribute__((destructor)) on uv_library_shutdown(), I’m assuming that this isn’t being automatically run on Windows anyway.

    I think just removing the #ifdef should be fine.

  2. richardlau commented on Sep 2, 2020

    @richardlau
    Member

    c8abb29 is one of two commits from joyent/libuv#1381.

  3. jasnell commented on Sep 2, 2020

    @jasnell
    ContributorAuthor

    @addaleax :

    I think just removing the #ifdef should be fine.

    Yeah, not seeing anything in local testing that would suggest otherwise. I'll get a PR opened.

  4. deleted a comment from stale on Jan 23, 2021
  5. stale commented on Feb 14, 2021

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions