| 208 | } |
| 209 | |
| 210 | WorkerAttachment* WorkerAttachment::getByName(const PathName& dbname) |
| 211 | { |
| 212 | if (m_shutdown) |
| 213 | return NULL; |
| 214 | |
| 215 | WorkerAttachment* ret = NULL; |
| 216 | MutexLockGuard guard(m_mapMutex, FB_FUNCTION); |
| 217 | |
| 218 | if (m_shutdown) |
| 219 | return NULL; |
| 220 | |
| 221 | if (!m_map->get(dbname, ret)) |
| 222 | { |
| 223 | ret = new WorkerAttachment(); |
| 224 | m_map->put(dbname, ret); |
| 225 | } |
| 226 | |
| 227 | return ret; |
| 228 | } |
| 229 | |
| 230 | void WorkerAttachment::shutdown() |
| 231 | { |