Revert "event/Thread: start the thread in the constructor"

This reverts commit b49cfe96f4.  It was
a bad idea because it broke signal handlers.  I need to find a better
way to fix io_uring intialization.
This commit is contained in:
Max Kellermann
2025-01-30 19:50:35 +01:00
parent 30bd70939a
commit 838398103c
13 changed files with 22 additions and 4 deletions
+6
View File
@@ -28,6 +28,12 @@ class GlobalInit {
EventThread io_thread;
public:
GlobalInit() {
io_thread.Start();
}
~GlobalInit() = default;
EventLoop &GetEventLoop() {
return io_thread.GetEventLoop();
}
+1
View File
@@ -24,6 +24,7 @@ try {
const char *path = argv[1];
EventThread io_thread;
io_thread.Start();
const ScopeInputPluginsInit input_plugins_init(ConfigData(),
io_thread.GetEventLoop());
+2
View File
@@ -84,6 +84,8 @@ public:
input_plugins_init(config, io_thread.GetEventLoop()),
decoder_plugins_init(config)
{
io_thread.Start();
pcm_convert_global_init(config);
}
};
+1
View File
@@ -47,6 +47,7 @@ try {
const auto config = AutoLoadConfigFile(config_path);
EventThread io_thread;
io_thread.Start();
const ScopeInputPluginsInit input_plugins_init(config, io_thread.GetEventLoop());
const ScopePlaylistPluginsInit playlist_plugins_init(config);
+1
View File
@@ -34,6 +34,7 @@ public:
explicit GlobalInit(Path config_path)
:config(AutoLoadConfigFile(config_path))
{
io_thread.Start();
}
};
+1
View File
@@ -86,6 +86,7 @@ try {
const char *path = argv[2];
EventThread io_thread;
io_thread.Start();
const ScopeInputPluginsInit input_plugins_init(ConfigData(),
io_thread.GetEventLoop());
+1
View File
@@ -91,6 +91,7 @@ public:
input_plugins_init(config, io_thread.GetEventLoop()),
decoder_plugins_init(config)
{
io_thread.Start();
}
};
+1
View File
@@ -130,6 +130,7 @@ public:
explicit GlobalInit(Path config_path)
:config(AutoLoadConfigFile(config_path))
{
io_thread.Start();
}
};
+1
View File
@@ -158,6 +158,7 @@ try {
const auto config = AutoLoadConfigFile(c.config_path);
EventThread io_thread;
io_thread.Start();
/* initialize the audio output */
+1
View File
@@ -114,6 +114,7 @@ public:
GlobalInit(Path config_path)
:config(AutoLoadConfigFile(config_path))
{
io_thread.Start();
}
EventLoop &GetEventLoop() noexcept {
+1
View File
@@ -35,6 +35,7 @@ public:
explicit GlobalInit(Path config_path)
:config(AutoLoadConfigFile(config_path))
{
io_thread.Start();
}
};