Commit f30d1e2
committed
Add async generator API to pywatchman_aio
Summary:
Many of the other client libraries have event driven async APIs, but python does not really have that currently. The best it has is `get_subscription` which acts as a polling api as it directly returns `q.get()` instead of returning the queue itself.
This diff adds an API to yield elements in the queue so that it can be used as an async generator to make the code more event driven.
Test Plan:
tbd1 parent 39fed47 commit f30d1e2
1 file changed
+16
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
261 | 277 | | |
262 | 278 | | |
263 | 279 | | |
| |||
0 commit comments