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

Move file hashing to a worker thread, add async method #21

Merged
merged 14 commits into from
Sep 22, 2019

Conversation

stroncium
Copy link
Contributor

@stroncium stroncium commented May 2, 2019

Move file hashing to thread, add async method, fixes #16

@stroncium stroncium changed the title Move file hashing to thread, solves #16 Move file hashing to thread, add async method, solves #16 May 19, 2019
@stroncium
Copy link
Contributor Author

@sindresorhus This one is ready, as far as I can tell.

@sindresorhus sindresorhus changed the title Move file hashing to thread, add async method, solves #16 Move file hashing to a worker thread, add async method Jun 29, 2019
@sindresorhus
Copy link
Owner

You need to add thread.js to files in package.json.

@sindresorhus
Copy link
Owner

Can you document in the method that uses worker threads that they use worker threads and are async?

index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
thread.js Outdated Show resolved Hide resolved
thread.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
@sindresorhus
Copy link
Owner

Also note sindresorhus/crypto-hash@46f2f28

Yanis Benson and others added 2 commits July 23, 2019 19:45
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
@stroncium
Copy link
Contributor Author

stroncium commented Sep 21, 2019

@sindresorhus Style fixed, added notes regarding worker_threads to relevant methods in ts and readme.

What do you think of moving worker_threads functionality into microlib in the future? We have partially mirroring implementation both in hasha and crypto-hash now(more functionality in hasha). I think have enough info to unify it.

@sindresorhus
Copy link
Owner

What do you think of moving worker_threads functionality into microlib in the future? We have partially mirroring implementation both in hasha and crypto-hash now(more functionality in hasha). I think have enough info to unify it.

Yeah, that would be great. I have a note somewhere on my computer about asking you to do that, actually.

@sindresorhus sindresorhus merged commit 7e6a0fd into sindresorhus:master Sep 22, 2019
@sindresorhus
Copy link
Owner

Looks good :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for doing the hashing in a worker thread
2 participants