-
Notifications
You must be signed in to change notification settings - Fork 255
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
Can I use a goldmark.Markdown from multiple goroutines? #182
Comments
I have done a simple test by changing
and that's however not a guarantee. And I should not commit that either, as the concurrency bugs would still be hard to replicate/debug if they actually happened. Maybe a separate test? But I think it's all concurrency safe, looking at the code. |
So it's not trivially broken. :D But not sure how much has @yuin thought about concurrency either |
Also, use |
In a dumb way we can use the fuzz tests to check this too, but... not sure. As most of the fuzzer inputs are not markdown and are garbage (naturally), it will probably parse them as a single text block without much work :) |
@moorereason tried that too now, thx. Also no bugs. |
I tried this dumb fuzzing, not sure if I do it correctly, but again if there is something super broken it would catch it if I'm not wrong.
It seems like it's working and not panicking. 🤷 |
Yes, you can use |
I've read all the documentation and haven't seen any mention of concurrency safety or the relative "cheapness" of producing a
goldmark.Markdown
for individual goroutines...The text was updated successfully, but these errors were encountered: