touchlab-lab / knarch.db

K(otlin)N(ative)A(rchitecture) Database
https://touchlab.co/
Apache License 2.0
90 stars 9 forks source link

Check that multiple threads have separate top level state #43

Open kpgalligan opened 6 years ago

kpgalligan commented 6 years ago

Using workers, all top level vars and objects have their own copy of state in different workers. This also appears to be true with threads that aren't started by a worker, but we should make sure that's true (and that the C++ layer state is global). This will impact things like ThreadLocal as more threading constructs are created.