Commit f7431f7
[mysql-5.6][PR] use lambda instead of std::bind
Summary:
std::bind(yield_condition, table) will generate a functor which size is larger than std::function's local buf, thus std::function needs to new/delete memory to store the functor.
This PR use the lambda which just capture one pointer(table), which size can fit into std::function's local buf thus new/delete is not needed.
Pull Request resolved: facebook#1243
GitHub Author: leipeng <peng@topling.cn>
Test Plan: Imported from GitHub, without a `Test Plan:` line.
Reviewers: mung
Reviewed By: mung
Subscribers: pgl, webscalesql-eng@fb.com
Differential Revision: https://phabricator.intern.facebook.com/D40858532
Tags: mysql80, accept2ship1 parent 40e7bcb commit f7431f7
2 files changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2912 | 2912 | | |
2913 | 2913 | | |
2914 | 2914 | | |
2915 | | - | |
| 2915 | + | |
2916 | 2916 | | |
2917 | 2917 | | |
2918 | 2918 | | |
| |||
6502 | 6502 | | |
6503 | 6503 | | |
6504 | 6504 | | |
6505 | | - | |
| 6505 | + | |
6506 | 6506 | | |
6507 | 6507 | | |
6508 | 6508 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2733 | 2733 | | |
2734 | 2734 | | |
2735 | 2735 | | |
2736 | | - | |
| 2736 | + | |
2737 | 2737 | | |
2738 | 2738 | | |
2739 | 2739 | | |
| |||
0 commit comments