ArthurHub / ArthurHub/HTML-Renderer
using Dictionary for caching causes multi-thread issues.
未關閉
bug
PDF
- 主要語言
- C#
- 星號
- 1.4k
- 分支
- 550
- 平均合併
- 14 天 9 小時
- 30 天內合併 PR
- 1
描述
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.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
找到 RAdapter 和 FontsHandler,接著檢查快取筆刷、畫筆和字型的字典。檢視多個 HtmlContainers 如何使用共用的 PdfSharpAdapter 執行個體,並將受影響的字典替換為並行集合。當這些快取可以在所述的多執行緒環境中安全使用時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- csharp
- 領域
- performance
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 42/100