Skip to content

Add test for preexec_fn fd double close issue #479

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

Closed
wants to merge 2 commits into from

Conversation

fantix
Copy link
Member

@fantix fantix commented Jul 17, 2022

Refs #466

@fantix
Copy link
Member Author

fantix commented Jul 17, 2022

@graingert may I ask for a review pls?

Co-authored-by: Thomas Grainger <[email protected]>
asyncio.run(test())
fut.result()
""")
subprocess.check_call([sys.executable, '-c', script])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
subprocess.check_call([sys.executable, '-c', script])
subprocess.run([sys.executable, '-c', script], check=True)

@graingert
Copy link
Contributor

graingert commented Jul 17, 2022

@graingert may I ask for a review pls?

Just doing a eyeball pass at the moment - will do a proper review later. My gut feeling is that I think it's a bit complicated using a thread pool executor and a queue and a pipe and an event so I'll see if I can have a ponder on making this simpler - eg just using threading.Barrier

import asyncio
import uvloop

uvloop.install()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the 3.11 test suite lands it might be worth conditionally using the modern asyncio.Runner(loop_factory=uvloop.new_event_loop)

@graingert
Copy link
Contributor

@graingert may I ask for a review pls?

Just doing a eyeball pass at the moment - will do a proper review later. My gut feeling is that I think it's a bit complicated using a thread pool executor and a queue and a pipe and an event so I'll see if I can have a ponder on making this simpler - eg just using threading.Barrier

ok I think I've managed to simplify this a lot: https://github.com/MagicStack/uvloop/pull/481/files#r924838769

@fantix
Copy link
Member Author

fantix commented Sep 2, 2022

Close in favor of #481

@fantix fantix closed this Sep 2, 2022
@fantix fantix deleted the preexec-fn-double-close branch September 2, 2022 16:19
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

Successfully merging this pull request may close these issues.

2 participants