foundationdb
foundationdb copied to clipboard
Prevent network thread from being re-created
After experimenting a bit, nothing bad happens when you
- Re-initialise the API (it throws an error but does no harm)
- Re-configure the network (same)
- Stop and re-start the network thread
... but everything after stopping and restarting the network thread leads to error 1100 (broken promise)
We should just prevent the network thread from being started multiple times.
Since it's unavoidable process-global state, this kind of dark art would actually be warranted for this: https://twitter.com/mattoflambda/status/997970082213937154