Interest in a Promise class?


#1

I was thinking of contributing a simple Promise class, which has get/set methods, and asyncronous context manager for recording exceptions. It simply allows you to coordinate the result of an asynchronous operation that takes place across multiple tasks.

Thoughts?


#2

Maybe. As Curio has grown a few new features, I’ve recently found myself thinking that it might make sense to have some sort of AsyncFuture class. I’ve been thinking it might be an interesting tool for mixing Curio tasks with AsyncThreads. A Promise class could certainly serve this purpose too. I’d encourage you to prototype something out and submit a pull request on it.


#3

Raised https://github.com/dabeaz/curio/pull/191