Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

static method AttributeTranslator.DicOfTranslators is not thread safe #480

Closed
proff opened this issue Apr 12, 2018 · 4 comments
Closed

static method AttributeTranslator.DicOfTranslators is not thread safe #480

proff opened this issue Apr 12, 2018 · 4 comments

Comments

@proff
Copy link

proff commented Apr 12, 2018

default
When loading excel files from different threads this method can be executed at same time. On screenshot we got race condition when inserting tblLook in non thread safe class Dictionary

@twsouthwick
Copy link
Member

The SDK is not guaranteed to be threadsafe. I've been slowly adding better synchronization/reduction of state to help it work better in a threaded environment, but since it was not designed initially to be threadsafe, it's a slow process. Can you provide a test that shows the exact scenario you are doing?

@twsouthwick
Copy link
Member

I took a quick look and can definitely see a possible cause (lots of unsynchronized read/write). A repro would help ensure it's a full fix, but is probably not necessary if it's hard to create (which a lot of multi-threaded issues tend to be)

@twsouthwick
Copy link
Member

I've marked this as up-for-grabs - should be a fairly easy fix. The dicOfTranslators can be preinitialized. If @proff or anyone else is interested, let me know and I'll assign you to it.

@twsouthwick
Copy link
Member

@proff I've submitted a fix for this. It turned out to be many kinds of wrong with multiple ways of entering race conditions. I completely redesigned this feature and it should work much more reliably. Thanks for notifying us of this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants