Main: move code to Partition::BeginShutdown()
This commit is contained in:
parent
f249a755e2
commit
5afec8256a
@ -27,7 +27,6 @@
|
|||||||
#include "Mapper.hxx"
|
#include "Mapper.hxx"
|
||||||
#include "Permission.hxx"
|
#include "Permission.hxx"
|
||||||
#include "Listen.hxx"
|
#include "Listen.hxx"
|
||||||
#include "client/Listener.hxx"
|
|
||||||
#include "client/Config.hxx"
|
#include "client/Config.hxx"
|
||||||
#include "client/List.hxx"
|
#include "client/List.hxx"
|
||||||
#include "command/AllCommands.hxx"
|
#include "command/AllCommands.hxx"
|
||||||
@ -349,8 +348,7 @@ inline void
|
|||||||
Instance::BeginShutdownPartitions() noexcept
|
Instance::BeginShutdownPartitions() noexcept
|
||||||
{
|
{
|
||||||
for (auto &partition : partitions) {
|
for (auto &partition : partitions) {
|
||||||
partition.pc.Kill();
|
partition.BeginShutdown();
|
||||||
partition.listener.reset();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,6 +52,13 @@ Partition::Partition(Instance &_instance,
|
|||||||
|
|
||||||
Partition::~Partition() noexcept = default;
|
Partition::~Partition() noexcept = default;
|
||||||
|
|
||||||
|
void
|
||||||
|
Partition::BeginShutdown() noexcept
|
||||||
|
{
|
||||||
|
pc.Kill();
|
||||||
|
listener.reset();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Partition::EmitIdle(unsigned mask) noexcept
|
Partition::EmitIdle(unsigned mask) noexcept
|
||||||
{
|
{
|
||||||
|
@ -74,6 +74,8 @@ struct Partition final : QueueListener, PlayerListener, MixerListener {
|
|||||||
|
|
||||||
~Partition() noexcept;
|
~Partition() noexcept;
|
||||||
|
|
||||||
|
void BeginShutdown() noexcept;
|
||||||
|
|
||||||
void EmitGlobalEvent(unsigned mask) noexcept {
|
void EmitGlobalEvent(unsigned mask) noexcept {
|
||||||
global_events.OrMask(mask);
|
global_events.OrMask(mask);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user