You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically, having one serializer instance (line marked (1)) serialize (3) calendars (2) in different threads is not thread safe - exceptions are thrown all over the place (index out of range, null reference and others)
That's scenario A: (1) shared, (2) created every time
Other combinations are not thread safe too:
Scenario B: (1) shared, (2) also shared
Scenario C: (1) created every time, (2) shared
Workaround?
The only case it works is when new instances of serializer (1) and calendar (2) are created every time, so basically (1), (2) and (3) are all inside try block in above example.
Thoughts
I'm not sure if this can be addressed and fixed easily unfortunatelly. This happens as far as I can tell because serializer mutates a calendar, here's even an issue related to this
Anyway, I'll leave this here in case someone finds it helpful
The text was updated successfully, but these errors were encountered:
Issue
Here's a small test:
Basically, having one serializer instance (line marked (1)) serialize (3) calendars (2) in different threads is not thread safe - exceptions are thrown all over the place (index out of range, null reference and others)
That's scenario A: (1) shared, (2) created every time
Other combinations are not thread safe too:
Scenario B: (1) shared, (2) also shared
Scenario C: (1) created every time, (2) shared
Workaround?
The only case it works is when new instances of serializer (1) and calendar (2) are created every time, so basically (1), (2) and (3) are all inside try block in above example.
Thoughts
I'm not sure if this can be addressed and fixed easily unfortunatelly. This happens as far as I can tell because serializer
mutates
a calendar, here's even an issue related to thisAnyway, I'll leave this here in case someone finds it helpful
The text was updated successfully, but these errors were encountered: