You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b7f2cb5
Browse filesBrowse the repository at this point in the historyBrowse files
A more elegant approach is adding a callback whenever a coroutine ends, in which we will check if it died for an exception or it has been cancelled (or obviously it has simply finished its work):
241
+
242
+
```python
243
+
244
+
asyncdefbroken_coroutine():
245
+
raiseException('OOOOOOPS')
246
+
247
+
defcheck_exception(coro):
248
+
# if the coroutine has been cancelled, just ignore it
Remember, you only need to pay attention to non-awaited coroutines, the others will correctly propagate the exception to the task awaiting it (obviously this task could be a not-awaited one, so as a general rule, add a callback every time you use asyncio.ensure_future())
262
+
210
263
## aiohttp
211
264
265
+
This is probably the most known third-party asyncio module. It basically interact with every HTTP aspect (server, client, websockets....)
266
+
212
267
## asyncio in your actors
213
268
214
269
### A simple Icecast/Shoutcast streaming radio Component
0 commit comments