pquentin on master
Enable random test ordering in … (compare)
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)
socket.is_readable() on a closed socket raises a ValueError:
trio/_socket.py in is_readable(self) 485 return bool(rready) 486 p = select.poll() --> 487 p.register(self._sock, select.POLLIN) 488 return bool(p.poll(0)) 489 ValueError: file descriptor cannot be a negative integer (-1)
i can put together a patch to change that to a
trio.ClosedResourceError if that's the desired approach there
ValueErrordoes seem like the wrong thing there, especially because it's probably inconsistent between different platforms...
OSError(EBADFD)or however you spell that. But
ClosedResourceErrorprobably makes more sense, because there isn't actually any syscall returning
NoneTypeissues 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?).
Conditions: 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.)
Conditions, which is that you have to be careful not to miss notifications – if you're not in
cond.waitwhen 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
FdStreamto talk to stdout?
Nursery" thread, I looked into arboreal terms for "branch point", but decided against suggesting the term they use