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

Add warning when multi-thread decompression is requested #3208

Conversation

tomcwang
Copy link
Contributor

address #2918

When user pass in argument for both decompression and multi-thread, print a warning message
to indicate that multi-threaded decompression is not supported.

When user pass in argument for both decompression and multi-thread, print a warning message
to indicate that multi-threaded decompression is not supported.
@yoniko
Copy link
Contributor

yoniko commented Jul 25, 2022

Thank you @tomcwang .
I see the check is inserted after -T0 is handled.
That means that a warning will be printed on decompression with -T0 on a multicore system.
Can you move the check to before the -T0 case is handled and nbWorkers are assigned?

@tomcwang
Copy link
Contributor Author

Thank you @tomcwang . I see the check is inserted after -T0 is handled. That means that a warning will be printed on decompression with -T0 on a multicore system. Can you move the check to before the -T0 case is handled and nbWorkers are assigned?

makes sense, I moved the check to before nbWorker is assigned, warning is not thrown for -T0 anymore.

move check to before nbWorker is assigned so we do not throw warning message when
-T0 is used.
@tomcwang tomcwang force-pushed the tomcwang/add_warning_for_multithread_decompression branch from e10567e to a2f7bcb Compare July 25, 2022 17:50
@yoniko
Copy link
Contributor

yoniko commented Jul 25, 2022

Thank you.
One last thing - can you please add tests to cli-tests/compression/multi-threaded.sh?

add test case for multi-threaded decoding warning.
Expecation is for -d -T0 we will not throw any warning,
and see warning for any other -d -T(>1) inputs
Copy link
Contributor

@yoniko yoniko left a comment

Choose a reason for hiding this comment

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

Looks good!

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