Main: move code to Partition::BeginShutdown()
This commit is contained in:
parent
f249a755e2
commit
5afec8256a
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,6 +52,13 @@ Partition::Partition(Instance &_instance,
|
||||
|
||||
Partition::~Partition() noexcept = default;
|
||||
|
||||
void
|
||||
Partition::BeginShutdown() noexcept
|
||||
{
|
||||
pc.Kill();
|
||||
listener.reset();
|
||||
}
|
||||
|
||||
void
|
||||
Partition::EmitIdle(unsigned mask) noexcept
|
||||
{
|
||||
|
@ -74,6 +74,8 @@ struct Partition final : QueueListener, PlayerListener, MixerListener {
|
||||
|
||||
~Partition() noexcept;
|
||||
|
||||
void BeginShutdown() noexcept;
|
||||
|
||||
void EmitGlobalEvent(unsigned mask) noexcept {
|
||||
global_events.OrMask(mask);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user