ArthurHub / ArthurHub/HTML-Renderer

using Dictionary for caching causes multi-thread issues.

Aperta
#63 1 commento 1 reazione 0 assegnatari Vedi su GitHub
bug PDF
Lingua principale
C#
Stelle
1.4k
Fork
550
Merge medio
14g 9h
PR unite (30g)
1

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.