Nathaniel J. Smith - Trio: Async concurrency for mere mortals - PyCon 2018

preview_player
Показать описание
Speaker: Nathaniel J. Smith

Concurrent programs are super useful: think of web apps juggling lots of simultaneous downloads and websocket connections, chat bots tracking multiple concurrent conversations, or web spiders fetching pages in parallel. But *writing* concurrent programs is complicated, intimidating to newcomers, and often challenging even for experts.

This talk assumes basic familiarity with Python, but does *not* require any prior experience with concurrency, async/await, or networking.

Рекомендации по теме
Комментарии
Автор

Trio is a big step forward in asynchronous programming IMHO. It's hard to capture its many concepts in such a short talk. If anyone wants to know more, Mr Smith's great blog posts on structured concurrency and cancel scope the place to start.

KevinZJR
Автор

Very very helpful talk, thank you. Now I get the feeling that I can implement "Happy Eye Balls" and some other things I did in Rxjs. I'm going to try Trio right now.

aweffrle
Автор

coming from kotlin, I'm glad that structured concurrency is available in Python, also. Great intro

michaelnajera
Автор

Are there more lectures by Nathaniel J. Smith ? Best presenter ever

rujingwang
Автор

Consider the case where an exception is stating that the process has an unbound resource. One of its ancestors should have the opportunity to bind something to that resource so the descendant has a chance to finish its work before it is killed. That is the closing of the child processes is contingent upon the exception being unresolved.

fredeisele
Автор

I wish Mr. Smith had spent more time explaining what's going on in the diagram at 19:28
He then jumps to some code where nothing is labeled "nursery" at 19:32
I know he was given a very short window to speak, but the idea of a nursery seems pretty important and I still don't quite get it.

AbeDillon
Автор

Somehow the syntax just seems unnatural to me when you say sink.send_eof( ) or sink.send_all(data). Makes it sound like as if sink is the one doing some work, when in fact we want to say "send all data TO sink" or "send an eof to sink". Perhaps a syntax like *trio.send_eof(sink)* or *trio.send_all(data, sink)* would be more intuitive.

gaatutube