Commit e9bc8e5
authored
feat(storage): reduce overhead in pooled handle factory (#6169)
Replace `std::vector<>` with `std::deque<>` because when the pool grows
too large we want to remove the *oldest* handles (fron the front). Also,
use a while loop during cleanup because it makes the intent clearer. I
expect that while loop to run at most once, but why force humans to
think this through?1 parent c893624 commit e9bc8e5
File tree
2 files changed
+6
-9
lines changed- google/cloud/storage/internal
2 files changed
+6
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 77 | + | |
81 | 78 | | |
82 | 79 | | |
83 | 80 | | |
| |||
111 | 108 | | |
112 | 109 | | |
113 | 110 | | |
114 | | - | |
| 111 | + | |
115 | 112 | | |
116 | 113 | | |
117 | 114 | | |
| |||
133 | 130 | | |
134 | 131 | | |
135 | 132 | | |
136 | | - | |
| 133 | + | |
137 | 134 | | |
138 | 135 | | |
139 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | | - | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | | - | |
| 117 | + | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
0 commit comments