Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Python jsbeautifier.beautify is not reentrant #163

Closed
fmairesse opened this Issue Dec 11, 2012 · 2 comments

Comments

Projects
None yet
2 participants
Contributor

fmairesse commented Dec 11, 2012

The function beautify of the python module jsbeautifier is not reentrant. This prevents to use the function in a multithreaded environment.

This is due to the use of a global variable 'parser_pos'.
Declaring the variable as a member of the class Beautifier fixes the problem.

Contributor

einars commented Dec 11, 2012

Would you please write and send a patch fixing this problem?

Contributor

einars commented Dec 12, 2012

Fixed in einars#164

@einars einars closed this Dec 12, 2012

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