andrewoma/kwery

Contended Table initialization?

Closed this issue · 1 comments

While Table instance is not initialized, columns are getting added.
If any other thread sees a Table instance after that and try to initialize it, writes into columns made by other thread may not be visible.

Unfortunately, I don't know any easy solutions to address the issue.

I'm glad I was wrong.
columns is a final field, and columns written there are accessible through 'dereference chain', and they're written before constructor ends ('freeze action').