Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove mixins in _windows_pipes.py and _unix_pipes.py? #830

Closed
njsmith opened this issue Dec 28, 2018 · 1 comment
Closed

Remove mixins in _windows_pipes.py and _unix_pipes.py? #830

njsmith opened this issue Dec 28, 2018 · 1 comment

Comments

@njsmith
Copy link
Member

njsmith commented Dec 28, 2018

I suspect this code will be nicer if we switch from inheritance → composition. This is a reminder to try it and find out :-)

@njsmith njsmith mentioned this issue Dec 28, 2018
3 tasks
njsmith added a commit to njsmith/trio that referenced this issue Jan 23, 2019
This addresses a number of issues:

- Fixes a major issue where aclose() called notify_fd_closed()
  unconditionally, even if the fd was closed; if the fd had already
  been recycled this could (and did) affect unrelated file
  descriptors:
    python-trio#661 (comment)
- Fixes a theoretical issue (not yet observed in the wild) where a
  poorly timed close could fail to be noticed by other tasks (python-triogh-661)
- Adds ConflictDetectors to catch attempts to use the same stream from
  multiple tasks simultaneously
- Switches from inheritance to composition (python-triogh-830)

Still todo:

- Tests for these race conditions that snuck through
- Audit _windows_pipes.py and _socket.py for related issues
njsmith added a commit to njsmith/trio that referenced this issue Jan 26, 2019
This addresses a number of issues:

- Fixes a major issue where aclose() called notify_fd_closed()
  unconditionally, even if the fd was closed; if the fd had already
  been recycled this could (and did) affect unrelated file
  descriptors:
    python-trio#661 (comment)
- Fixes a theoretical issue (not yet observed in the wild) where a
  poorly timed close could fail to be noticed by other tasks (python-triogh-661)
- Adds ConflictDetectors to catch attempts to use the same stream from
  multiple tasks simultaneously
- Switches from inheritance to composition (python-triogh-830)

Still todo:

- Tests for these race conditions that snuck through
- Audit _windows_pipes.py and _socket.py for related issues
@njsmith
Copy link
Member Author

njsmith commented Jan 28, 2019

Fixed in #874 and #884.

@njsmith njsmith closed this as completed Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant