event/Thread: start the thread in the constructor
This is the proper fix for thee309941646
regression; see commitabc8420697
This commit is contained in:
@@ -28,12 +28,6 @@ class GlobalInit {
|
||||
EventThread io_thread;
|
||||
|
||||
public:
|
||||
GlobalInit() {
|
||||
io_thread.Start();
|
||||
}
|
||||
|
||||
~GlobalInit() = default;
|
||||
|
||||
EventLoop &GetEventLoop() {
|
||||
return io_thread.GetEventLoop();
|
||||
}
|
||||
|
@@ -24,7 +24,6 @@ try {
|
||||
const char *path = argv[1];
|
||||
|
||||
EventThread io_thread;
|
||||
io_thread.Start();
|
||||
|
||||
const ScopeInputPluginsInit input_plugins_init(ConfigData(),
|
||||
io_thread.GetEventLoop());
|
||||
|
@@ -84,8 +84,6 @@ public:
|
||||
input_plugins_init(config, io_thread.GetEventLoop()),
|
||||
decoder_plugins_init(config)
|
||||
{
|
||||
io_thread.Start();
|
||||
|
||||
pcm_convert_global_init(config);
|
||||
}
|
||||
};
|
||||
|
@@ -47,7 +47,6 @@ 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);
|
||||
|
@@ -34,7 +34,6 @@ public:
|
||||
explicit GlobalInit(Path config_path)
|
||||
:config(AutoLoadConfigFile(config_path))
|
||||
{
|
||||
io_thread.Start();
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -86,7 +86,6 @@ try {
|
||||
const char *path = argv[2];
|
||||
|
||||
EventThread io_thread;
|
||||
io_thread.Start();
|
||||
|
||||
const ScopeInputPluginsInit input_plugins_init(ConfigData(),
|
||||
io_thread.GetEventLoop());
|
||||
|
@@ -91,7 +91,6 @@ public:
|
||||
input_plugins_init(config, io_thread.GetEventLoop()),
|
||||
decoder_plugins_init(config)
|
||||
{
|
||||
io_thread.Start();
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -130,7 +130,6 @@ public:
|
||||
explicit GlobalInit(Path config_path)
|
||||
:config(AutoLoadConfigFile(config_path))
|
||||
{
|
||||
io_thread.Start();
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -158,7 +158,6 @@ try {
|
||||
const auto config = AutoLoadConfigFile(c.config_path);
|
||||
|
||||
EventThread io_thread;
|
||||
io_thread.Start();
|
||||
|
||||
/* initialize the audio output */
|
||||
|
||||
|
@@ -114,7 +114,6 @@ public:
|
||||
GlobalInit(Path config_path)
|
||||
:config(AutoLoadConfigFile(config_path))
|
||||
{
|
||||
io_thread.Start();
|
||||
}
|
||||
|
||||
EventLoop &GetEventLoop() noexcept {
|
||||
|
@@ -35,7 +35,6 @@ public:
|
||||
explicit GlobalInit(Path config_path)
|
||||
:config(AutoLoadConfigFile(config_path))
|
||||
{
|
||||
io_thread.Start();
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user