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

test: remove thread-safe function uv thread usage #28472

Conversation

gabrielschulhof
Copy link
Contributor

Migrate the thread-safe function test from using uv_thread_* to using
C11's thrd_*.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jun 28, 2019
@gabrielschulhof gabrielschulhof added the node-api Issues and PRs related to the Node-API. label Jun 28, 2019
@nodejs-github-bot
Copy link
Collaborator

Migrate the thread-safe function test from using `uv_thread_*` to using
C11's `thrd_*`.
@gabrielschulhof gabrielschulhof force-pushed the n-api-tsfn-test-with-thrd-create branch from 224dd8a to 44384d7 Compare June 28, 2019 19:46
@gabrielschulhof
Copy link
Contributor Author

Looks like we're not quite ready for this. A bunch of the platforms are missing threads.h.

@addaleax
Copy link
Member

@gabrielschulhof If you want to do this (and maybe the PR description/commit message could mention why this is being done), I think C++ std::thread is the easier way to go. That’s in C++11 and should be included everywhere.

@gabrielschulhof
Copy link
Contributor Author

@addaleax I'd like to keep this test as C though. I think I'll push for std::thread usage in node-addon-api though (nodejs/node-addon-api#442) and revisit this when threads.h is more widely available.

@gabrielschulhof
Copy link
Contributor Author

@addaleax I'll keep the branch around. I've updated the commit message to read

test: remove thread-safe function uv thread usage

Migrate the thread-safe function test from using `uv_thread_*` to using
C11's `thrd_*`. This would remove the need for us to warn about the
fact that a project is only as ABI-stable as its least ABI-stable
dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
node-api Issues and PRs related to the Node-API. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants