MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / shutdown

Method shutdown

src/remote/server/server.cpp:7409–7434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7407}
7408
7409void Worker::shutdown()
7410{
7411 MutexLockGuard guard(m_mutex, FB_FUNCTION);
7412 if (shutting_down)
7413 {
7414 return;
7415 }
7416
7417 shutting_down = true;
7418
7419 while (getCount())
7420 {
7421 wakeUpAll();
7422 m_mutex->leave(); // we need CheckoutGuard here
7423 try
7424 {
7425 Thread::sleep(100);
7426 }
7427 catch (const Exception&)
7428 {
7429 m_mutex->enter(FB_FUNCTION);
7430 throw;
7431 }
7432 m_mutex->enter(FB_FUNCTION);
7433 }
7434}
7435
7436static int shut_server(const int, const int, void*)
7437{

Callers

nothing calls this directly

Calls 3

sleepFunction · 0.50
leaveMethod · 0.45
enterMethod · 0.45

Tested by

no test coverage detected