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

Lack of thread guards in DiskFile #181

Open
animetosho opened this issue Jun 3, 2023 · 0 comments
Open

Lack of thread guards in DiskFile #181

animetosho opened this issue Jun 3, 2023 · 0 comments

Comments

@animetosho
Copy link
Contributor

The DiskFile class uses serr to output errors. This class is used in a number of multi-threaded places in Par2Repairer (e.g. here), but there are no guards around serr usage.

Although this is only used for outputting errors, it still would make sense to mark these as critical sections.

Also worth pointing out that sout is never used in the class and could be removed.
It might also be worth considering exporting all the logging functions to some abstraction layer, as it could help with libpar2 usage where applications don't want output on stdout/err.

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

No branches or pull requests

1 participant