We used approach #1: https://github.com/Zaplib/zaplib/blob/7976d39775dd1642f20d8b...
I might write a blog post about this, since it's pretty fun / tricky stuff!
I might write a blog post about this, since it's pretty fun / tricky stuff!
Basically the main thread sends a command to an io executor thread, and then waits on the result, which is done using atomics under the hood.
See e.g. https://github.com/cloudpeers/radixdb/blob/sqlite/browser/sr...
Can't wait to play with zaplib. Can you also use it as just a standard library without the GUI part?