oremanj on master
Bump version to 0.4.0 for relea… Bump version to 0.4.0+dev post … Merge pull request #23 from ore… (compare)
pquentin on master
Use GitHub Actions for macOS CI… (compare)
njsmith on master
Update mypy to 0.750 Rearrange for better inference blacken and 2 more (compare)
njsmith on master
Fix some false negatives Update tests Merge pull request #19 from ore… (compare)
njsmith on master
Mark context managers that can'… Merge pull request #20 from ore… (compare)
njsmith on master
Update black to 19.10b0 Merge pull request #21 from ore… (compare)
OSError(EBADFD)
or however you spell that. But ClosedResourceError
probably makes more sense, because there isn't actually any syscall returning EBADFD
NoneType
issues solve. I changed what I was doing and it didn't crop up again. I'll open an issue for the proc kill thing. As for my use of conditions: I'm really unsure how to use condition in async code. In threaded coded, I'd lock over shared data, but in async if you don't have to await while touching shared data, do you need to hold the condition (or the underlying lock?).
Condition
s: they're pretty tricky to use! You're right that you don't necessarily need to lock your data to prevent race conditions, because so many operations in async code are automatically atomic. (Though you still might want to use locking just to be explicit and avoid having to think too hard about which operations are atomic and which ones aren't.)
Condition
s, which is that you have to be careful not to miss notifications – if you're not in cond.wait
when someone calls notify
, then you'll never know that it happened. And the lock can sometimes help with this, because taking the lock also blocks anyone else from calling notify
.
print(x)
FdStream
to talk to stdout?
Nursery
" thread, I looked into arboreal terms for "branch point", but decided against suggesting the term they use
Flume
, Canal
, Chute
, Conduit
, Intake
, Siphon
, Orifice
.What's the easiest way to run a bunch of tasks in a given order with at most n
in parallel.
async def main():
async with trio.open_nursery() as nursery:
for i in range(1000):
nursery.start_soon(slow_lookup, i)
In the example, other parts of the code are awaiting for a specific value j
to be mapped to an i
. Lower values of i
are much more likely to map to any j
, so I'd like to start them in order. Does that make sense?