question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GetDefault is not thread safe

See original GitHub issue

I get an exemption on return _default[fileType];

System.InvalidOperationException: ‘Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection’s state is no longer correct.’

I think this method should be thread safe.

https://github.com/Shazwazza/Smidge/blob/af644c64713b2425d78949cf8e539a2fac0ff044/src/Smidge/FileProcessors/PreProcessPipelineFactory.cs#L64

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Shazwazzacommented, Jul 16, 2018

Sure thing, i’ll message back here if i get make some time sooner, thanks!

1reaction
benaadamscommented, Jul 19, 2018

Added an issue to corefx so its easier to find in search https://github.com/dotnet/corefx/issues/31186

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is Java's TimeZone thread-safe?
I looked once at the source code for it and came to a conclusion that it was not. Look at JodaTime timezone class....
Read more >
[JDK-4808233] "Locale" not thread-safe - Java Bug System
java.util.Locale seems not to be thread safe, as I look at the source code. The static method getDefault() is not synchronized. The code...
Read more >
[ICU-9737] locale::GetDefault() in locid.cpp is not thread-safe
This is a security bug reported against Chrome's copy of ICU (4.6.1), but it appears that ToT has the same problem as far...
Read more >
Ensuring the thread-safety of the entire codebase : r/java
Thread safety is only a risk when you have shared mutable state. No shared mutable state, no thread safety risk. IMO, most of...
Read more >
LocalizedBundle internal locale switch has no thread safety #137
Describe the bug LocalizedBundle switches to Locale.getDefault() when its changes, but this is not thread safe, because Locale.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found