html-to-markdown
html-to-markdown copied to clipboard
Is `Converter` safe for use by multiple goroutines?
This should be documented. Is it safe to use by multiple goroutines? Am I expected to use one single instance of Converter
with same configuration across my app, or to create new in each case? What's the design, what are performance considerations?
PS: there is sync.RWMutex
within Converter
struct, so the answer is probably yes, but, again, this should be documented to not guess or reverse engineer.
@inliquid good catch, I definitely have to add documentation for this.
It's safe to use by multiple goroutines and you can use a single instance or multiple. Whatever you want.
There seems to be one test for that, but I definitely have to add more 🤔