ArthurHub / ArthurHub/HTML-Renderer
using Dictionary for caching causes multi-thread issues.
- Linguagem predominante
- C#
- Estrelas
- 1.4k
- Forks
- 550
- Merge médio
- 14d 9h
- PRs com merge (30d)
- 1
Descrição
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.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Direção de pesquisa
Localize RAdapter e FontsHandler e, em seguida, inspecione os dicionários que armazenam brushes, pens e fontes em cache. Revise como a instância compartilhada de PdfSharpAdapter é usada por vários HtmlContainers e substitua os dicionários afetados por coleções concorrentes. Está concluído quando os caches puderem ser usados com segurança no ambiente multithread descrito.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- csharp
- Domínio
- performance
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Claramente especificada
- Facilidade para iniciantes
- 42/100