[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:
Depends
depends on SERVER-36473 Make a dedicated RAII class to manage... Closed
depends on SERVER-37890 Add a callback to the ThreadPool opti... Closed
Sprint: Storage NYC 2018-11-19
Participants:

 Description   

We should change all calls from Client::initThread to the Client RAII helper made in SERVER-36473. This will allow us to make the Client::initThread functions private and everything will have to go through the RAII class.



 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.

Generated at Thu Feb 08 04:47:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.