[SERVER-37894] Substitute calls from Client::initThread to the Client RAII helper Created: 02/Nov/18 Updated: 14/Nov/18 Resolved: 14/Nov/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Gregory Wlodarek | Assignee: | Gregory Wlodarek |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Sprint: | Storage NYC 2018-11-19 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
We should change all calls from Client::initThread to the Client RAII helper made in |
| Comments |
| Comment by Gregory Wlodarek [ 14/Nov/18 ] |
|
Client::initThread() is used in conjunction with ThreadPool, and there are many calls to Client::initThread() inside of the ThreadPool::onCreateThread() callback. Switching these to the Client RAII type would cause the client to be destructed before the body of the thread gets a chance to execute. I'm closing this as it'd be better leaving it the way it is today. Instead of having to teach the ThreadPool about ThreadClient it would just be easier where the ThreadPool's onCreateThread() callback created ThreadClient instances where they need them. |