In my application, the main thread sets up the g_network
instance and runs an event loop by g_network->run()
, and there is also another thread running the fdb client’s event loop.
It seems that g_network
is a global variable defined in flow/flow.cpp
, and the fdb client library also requires setupNetwork
first. Does it mean that there will be two threads concurrently modifying and accessing the same g_network
variable? I just tried this, and it works, but I don’t understand why.