Commit 5afec825 authored by Max Kellermann's avatar Max Kellermann

Main: move code to Partition::BeginShutdown()

parent f249a755
......@@ -27,7 +27,6 @@
#include "Mapper.hxx"
#include "Permission.hxx"
#include "Listen.hxx"
#include "client/Listener.hxx"
#include "client/Config.hxx"
#include "client/List.hxx"
#include "command/AllCommands.hxx"
......@@ -349,8 +348,7 @@ inline void
Instance::BeginShutdownPartitions() noexcept
{
for (auto &partition : partitions) {
partition.pc.Kill();
partition.listener.reset();
partition.BeginShutdown();
}
}
......
......@@ -53,6 +53,13 @@ Partition::Partition(Instance &_instance,
Partition::~Partition() noexcept = default;
void
Partition::BeginShutdown() noexcept
{
pc.Kill();
listener.reset();
}
void
Partition::EmitIdle(unsigned mask) noexcept
{
instance.EmitIdle(mask);
......
......@@ -74,6 +74,8 @@ struct Partition final : QueueListener, PlayerListener, MixerListener {
~Partition() noexcept;
void BeginShutdown() noexcept;
void EmitGlobalEvent(unsigned mask) noexcept {
global_events.OrMask(mask);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment