Main: start IO threads before initializing the rest
This fixes a regression triggered by commit e309941646e0ff1b6 - IORING_SETUP_SINGLE_ISSUER broke because io_uring_setup() was called fromm the main thread, yet io_uring_submit() in the I/O thread. This is because the I/O thread was not yet started when InitUringInputPlugin() was called, and BlockingCall() was invoked synchronously in the main thread. This has always been wrong, but was never noticed.
This commit is contained in:
parent
e309941646
commit
abc8420697
@ -329,6 +329,9 @@ MainConfigured(const CommandLineOptions &options,
|
||||
Instance instance;
|
||||
global_instance = &instance;
|
||||
|
||||
instance.io_thread.Start();
|
||||
instance.rtio_thread.Start();
|
||||
|
||||
#ifdef ENABLE_NEIGHBOR_PLUGINS
|
||||
instance.neighbors = std::make_unique<NeighborGlue>();
|
||||
instance.neighbors->Init(raw_config,
|
||||
@ -421,9 +424,6 @@ MainConfigured(const CommandLineOptions &options,
|
||||
};
|
||||
#endif
|
||||
|
||||
instance.io_thread.Start();
|
||||
instance.rtio_thread.Start();
|
||||
|
||||
#ifdef ENABLE_NEIGHBOR_PLUGINS
|
||||
if (instance.neighbors != nullptr)
|
||||
instance.neighbors->Open();
|
||||
|
Loading…
x
Reference in New Issue
Block a user