[SERVER-67927] change ServiceExecutor::ThreadingModel definition Created: 08/Jul/22  Updated: 29/Oct/23  Resolved: 14/Jul/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Billy Donahue Assignee: Billy Donahue
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2022-07-25
Participants:

 Description   

The transport::ServiceExecutor defines the enum class ThreadingModel.
It has only the kBorrowed and kDedicated states. By its nature, this can really only have two states and an enum class is needlessly opaque. But type safety is desired so we don't want to just replace it with bool.

Change the definition from enum class ThreadingModel to enum HasDedicatedThread : bool to get best of both worlds.

Remove the redundant typedef in ServiceExecutorContext. No need for that.



 Comments   
Comment by Githook User [ 14/Jul/22 ]

Author:

{'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}

Message: SERVER-67927 ServiceExecutor: ThreadingModel -> HasDedicatedThread
Branch: master
https://github.com/mongodb/mongo/commit/4725f9b1fb48e95fd96284ccaa371d08f8cb8b41

Comment by Billy Donahue [ 09/Jul/22 ]

https://github.com/10gen/mongo/pull/6307

Generated at Thu Feb 08 06:09:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.