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

Function attachmentShutdownThread

src/jrd/jrd.cpp:8918–8956  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8916 }
8917
8918 THREAD_ENTRY_DECLARE attachmentShutdownThread(THREAD_ENTRY_PARAM arg)
8919 {
8920#ifdef WIN_NT
8921 ThreadModuleRef thdRef(attachmentShutdownThread, &engineShutdown);
8922#endif
8923
8924 AttShutParams* params = static_cast<AttShutParams*>(arg);
8925 AttachmentsRefHolder* attachments = params->attachments;
8926
8927 try
8928 {
8929 params->startCallCompleteSem.enter();
8930 }
8931 catch (const Exception& ex)
8932 {
8933 iscLogException("attachmentShutdownThread", ex);
8934 return 0;
8935 }
8936
8937 fb_assert(params->thread.isCurrent());
8938 Thread::Mark mark(params->thread);
8939
8940 try
8941 {
8942 shutThreadCollect->running(std::move(params->thread));
8943 params->thdStartedSem.release();
8944
8945 MutexLockGuard guard(shutdownMutex, FB_FUNCTION);
8946 if (!engineShutdown)
8947 shutdownAttachments(attachments, isc_att_shut_db_down);
8948 }
8949 catch (const Exception& ex)
8950 {
8951 iscLogException("attachmentShutdownThread", ex);
8952 }
8953
8954 shutThreadCollect->ending(mark);
8955 return 0;
8956 }
8957} // anonymous namespace
8958
8959

Callers

nothing calls this directly

Calls 8

iscLogExceptionFunction · 0.85
shutdownAttachmentsFunction · 0.85
runningMethod · 0.80
endingMethod · 0.80
moveFunction · 0.50
enterMethod · 0.45
isCurrentMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected