[SERVER-47825] Use std::bind only when necessary (roughly never) Created: 28/Apr/20 Updated: 29/Oct/23 Resolved: 28/Apr/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 4.7.0 |
| 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 | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Service arch 2020-05-04 | ||||||||
| Participants: | |||||||||
| Description |
|
std::bind has some special behavior that can kick in at surprising times.
An analysis of the problems here: https://abseil.io/tips/108 Unless you need behaviors 1 or 2, you're better off with a polymorphic lambda. Replace std::bind in all other cases (only 2 files), so we don't get used to seeing it in the codebase. A previous sweep ( |
| Comments |
| Comment by Githook User [ 28/Apr/20 ] |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: |
| Comment by Billy Donahue [ 28/Apr/20 ] |