summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-01-29 23:31:41 +0100
committerMax Kellermann <max@musicpd.org>2018-01-29 23:31:41 +0100
commitbefd669075f6116187e3bd5cfd1572a602550d20 (patch)
tree8a2ad525df58dc904a694947b6be3882b18e37a1
parentb6013a92e0705101eb8f8796c6b0117f03887462 (diff)
Instance: rename Shutdown() to Break()
-rw-r--r--src/Instance.hxx4
-rw-r--r--src/Main.cxx2
-rw-r--r--src/client/ClientRead.cxx2
-rw-r--r--src/win32/Win32Main.cxx4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/Instance.hxx b/src/Instance.hxx
index cd05c75f2..4378dc18e 100644
--- a/src/Instance.hxx
+++ b/src/Instance.hxx
@@ -97,9 +97,9 @@ struct Instance final
~Instance() noexcept;
/**
- * Initiate shutdown. Wrapper for EventLoop::Break().
+ * Wrapper for EventLoop::Break(). Call to initiate shutdown.
*/
- void Shutdown() {
+ void Break() {
event_loop.Break();
}
diff --git a/src/Main.cxx b/src/Main.cxx
index 9a4a0ec8a..5f151f5ab 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -747,7 +747,7 @@ JNIEXPORT void JNICALL
Java_org_musicpd_Bridge_shutdown(JNIEnv *, jclass)
{
if (instance != nullptr)
- instance->Shutdown();
+ instance->Break();
}
#endif
diff --git a/src/client/ClientRead.cxx b/src/client/ClientRead.cxx
index 20547d3c0..0ea79174e 100644
--- a/src/client/ClientRead.cxx
+++ b/src/client/ClientRead.cxx
@@ -52,7 +52,7 @@ Client::OnSocketInput(void *data, size_t length) noexcept
break;
case CommandResult::KILL:
- partition->instance.Shutdown();
+ partition->instance.Break();
Close();
return InputResult::CLOSED;
diff --git a/src/win32/Win32Main.cxx b/src/win32/Win32Main.cxx
index e26846321..6475509b0 100644
--- a/src/win32/Win32Main.cxx
+++ b/src/win32/Win32Main.cxx
@@ -71,7 +71,7 @@ service_dispatcher(gcc_unused DWORD control, gcc_unused DWORD event_type,
switch (control) {
case SERVICE_CONTROL_SHUTDOWN:
case SERVICE_CONTROL_STOP:
- instance->Shutdown();
+ instance->Break();
return NO_ERROR;
default:
return NO_ERROR;
@@ -107,7 +107,7 @@ console_handler(DWORD event)
// regardless our thread is still active.
// If this did not happen within 3 seconds
// let's shutdown anyway.
- instance->Shutdown();
+ instance->Break();
// Under debugger it's better to wait indefinitely
// to allow debugging of shutdown code.
Sleep(IsDebuggerPresent() ? INFINITE : 3000);