Make the MarkdownPipeline thread safe / immutable #8

Closed
opened 2026-01-29 14:19:10 +00:00 by claunia · 0 comments
Owner

Originally created by @xoofx on GitHub (May 30, 2016).

The MarkdownPipeline is currently not threadsafe and is not immutable.
Options are to use a MarkdownPipelineBuilder and a .Build() method that would freeze the pipeline into an opaque MarkdownPipeline

Quid of properties on parsers? We may not make it fully immutable (e.g we would leave OpeningCharacters not immutable to simplify the design and avoid having to introduce a freeze methods for parsers) but at least prevent parsers to be added/removed after the pipeline has been created. Still this has to be determined and documented clearly

Originally created by @xoofx on GitHub (May 30, 2016). The `MarkdownPipeline` is currently not threadsafe and is not immutable. Options are to use a `MarkdownPipelineBuilder` and a `.Build()` method that would freeze the pipeline into an opaque `MarkdownPipeline` Quid of properties on parsers? We may not make it fully immutable (e.g we would leave OpeningCharacters not immutable to simplify the design and avoid having to introduce a freeze methods for parsers) but at least prevent parsers to be added/removed after the pipeline has been created. Still this has to be determined and documented clearly
claunia added the enhancement label 2026-01-29 14:19:10 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#8