[Async-sig] New blog post: Notes on structured concurrency, or: Go statement considered harmful

2018-04-25 Thread Nathaniel Smith
Hi all, I just posted another essay on concurrent API design: https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/ This is the one that finally gets at the core reasons why Trio exists; I've been trying to figure out how to write it for at least a year now.

Re: [Async-sig] New blog post: Notes on structured concurrency, or: Go statement considered harmful

2018-04-25 Thread Andrew Svetlov
Interesting, thanks On Wed, Apr 25, 2018 at 12:24 PM Nathaniel Smith wrote: > Hi all, > > I just posted another essay on concurrent API design: > > > https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/ > > This is the one that finally gets at the core reas

Re: [Async-sig] New blog post: Notes on structured concurrency, or: Go statement considered harmful

2018-04-25 Thread Antoine Pitrou
On Wed, 25 Apr 2018 02:24:15 -0700 Nathaniel Smith wrote: > Hi all, > > I just posted another essay on concurrent API design: > > https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/ > > This is the one that finally gets at the core reasons why Trio exists

Re: [Async-sig] Cancelling a coroutine from a signal handler?

2018-04-25 Thread Mark E. Haase
On Tue, Apr 24, 2018 at 9:54 PM, Nathaniel Smith wrote: > > The simplest solution would be to use asyncio's native signal handler > support instead of the signal module: > https://docs.python.org/3/library/asyncio-eventloop.html#unix-signals > Ahh, wow, I don't know how I missed this. I've been o

Re: [Async-sig] Cancelling a coroutine from a signal handler?

2018-04-25 Thread Nathaniel Smith
On Wed, Apr 25, 2018, 06:34 Mark E. Haase wrote: > > This is also an interesting approach that I will experiment with. I guess > this solves problem #1 (works on Windows) but not #2 (task stuck in loop), > right? (The latter is a feature of all cooperative multitasking systems, > yeah?) > If a t

Re: [Async-sig] New blog post: Notes on structured concurrency, or: Go statement considered harmful

2018-04-25 Thread Guido van Rossum
Now there's a PEP I'd like to see. On Wed, Apr 25, 2018 at 2:24 AM, Nathaniel Smith wrote: > Hi all, > > I just posted another essay on concurrent API design: > > https://vorpus.org/blog/notes-on-structured-concurrency-or- > go-statement-considered-harmful/ > > This is the one that finally gets