Commit b5e753a
Allow custom preLoop and postLoop hooks
Summary:
Hyperclient polls EventBases directly, and it would like to receive the number of events processed per loopPoll() call. The easiest way is to use eb_loop_poll_hook. However this doesn't work for us (see D93285393), because these hooks are per-process, only 1 hook is allowed. ucache already uses these hooks, and hyperclient will be in the same process with ucache, this breaks other tests (see T256167952).
As a result, we would like to have per-EventBase custom preLoop and postLoop hooks.
Reviewed By: spikeh
Differential Revision: D93625126
fbshipit-source-id: 285d3bc9470b51dbcae8e37fa098dae8095565d81 parent b101f74 commit b5e753a
4 files changed
Lines changed: 644 additions & 0 deletions
File tree
- third-party/folly/src/folly/io/async
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
232 | 235 | | |
233 | 236 | | |
234 | 237 | | |
| |||
239 | 242 | | |
240 | 243 | | |
241 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
242 | 248 | | |
243 | 249 | | |
244 | 250 | | |
| |||
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
117 | 134 | | |
118 | 135 | | |
119 | 136 | | |
| |||
129 | 146 | | |
130 | 147 | | |
131 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
132 | 153 | | |
133 | 154 | | |
134 | 155 | | |
| |||
139 | 160 | | |
140 | 161 | | |
141 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
142 | 166 | | |
143 | 167 | | |
144 | 168 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1183 | 1183 | | |
1184 | 1184 | | |
1185 | 1185 | | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
1186 | 1189 | | |
1187 | 1190 | | |
1188 | 1191 | | |
1189 | 1192 | | |
1190 | 1193 | | |
1191 | 1194 | | |
1192 | 1195 | | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
1193 | 1200 | | |
1194 | 1201 | | |
1195 | 1202 | | |
| |||
0 commit comments