ArthurHub / ArthurHub/HTML-Renderer
using Dictionary for caching causes multi-thread issues.
Open
bug
PDF
- Dominant language
- C#
- Stars
- 1.4k
- Forks
- 550
- Avg merge
- 14d 9h
- Merged PRs (30d)
- 1
Description
In RAdapter and FontsHandler, Dictionaries are used to cached brushes, pens and fonts.
Single instance pattern is used by PdfSharpAdapter, and this instance is used by all HtmlContainers generated during system running time.
It causes problem when using this single instance in a multi-thread environment. [Refer Here](http://stackoverflow.com/questions/1920864/when-does-a-dictionary-throw-an-indexoutofrangeexception-on-add-or-containskey)
Please replace Dictionary with ConcurrentDictionary.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.