-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Labels
Description
There's currently a bug with the implementation of thread safe random access that was committed. It uses a static constructor to initialize a ThreadStatic marked field, which will cause subsequent threads to throw a null reference exception. Initialization at the field level or static constructor level for a ThreadStatic field will only ever run once on the first thread to reach the type, any subsequent threads will access an uninitialized variable.
This is an important feature to my company's usage of the library and we were hoping to avoid maintaining a fork just for this change, so I'm submitting a pull request to add a new unit test and correct the bug. More details in the PR (#61)