Repository navigation
Make SmartFormatter.Format(...) methods thread-safe - #473
Conversation
- Removed `ThreadStatic` attribute from the `Smart.Default` instance of `SmartFormatter`. - Added `Parallel` unit tests ensuring thread-safe operations with shared `SmartFormatter` instances with different `Smart.Extensions`. - Updated documentation in `Parser.cs`, `Smart.cs`, and `SmartFormatter.cs` to clarify thread safety of methods.
|
@karljj1 After making the The Removing the |
|
Yeah I think mentioning it should be fine. Do you know what difference this makes to performance? When I first started using the library I noticed removing the multi-threading support improved the performance. Would it be possible to put the thread support behind an ifdef so it can be toggled on/off? |
|
Thanks for your quick reply. So then the PR is ready for review. Making the Regarding And yes, |
karljj1
left a comment
There was a problem hiding this comment.
Thanks! Sounds great :)
ThreadStaticattribute from theSmart.Defaultinstance ofSmartFormatter.Parallelunit tests ensuring thread-safe operations with sharedSmartFormatterinstances with differentSmart.Extensions.Parser.cs,Smart.cs, andSmartFormatter.csto clarify thread safety of methods.