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

Method fini

src/jrd/WorkerAttachment.cpp:111–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111void WorkerStableAttachment::fini()
112{
113 Attachment* attachment = NULL;
114 {
115 AttSyncLockGuard guard(*getSync(), FB_FUNCTION);
116
117 attachment = getHandle();
118 if (!attachment)
119 return;
120
121 Database* dbb = attachment->att_database;
122
123 FbLocalStatus status_vector;
124 ThreadContextHolder tdbb(dbb, attachment, &status_vector);
125 DatabaseContextHolder dbHolder(tdbb);
126
127 Monitoring::cleanupAttachment(tdbb);
128 dbb->dbb_extManager->closeAttachment(tdbb, attachment);
129
130 attachment->releaseLocks(tdbb);
131 LCK_fini(tdbb, LCK_OWNER_attachment);
132
133 attachment->releaseRelations(tdbb);
134 }
135
136 destroy(attachment);
137
138 m_workers->decWorkers();
139}
140
141/// class WorkerAttachment
142

Callers 1

doDetachMethod · 0.45

Calls 6

LCK_finiFunction · 0.85
releaseLocksMethod · 0.80
releaseRelationsMethod · 0.80
decWorkersMethod · 0.80
destroyFunction · 0.50
closeAttachmentMethod · 0.45

Tested by

no test coverage detected