René's URL Explorer Experiment


Title: Asynchronous multiprocessing.Pipe reads throw when using uvloop · Issue #686 · MagicStack/uvloop · GitHub

Open Graph Title: Asynchronous multiprocessing.Pipe reads throw when using uvloop · Issue #686 · MagicStack/uvloop

X Title: Asynchronous multiprocessing.Pipe reads throw when using uvloop · Issue #686 · MagicStack/uvloop

Description: Summary When using an asyncio.Event() with loop.add_reader() to asynchronously read from a multiprocessing.Pipe, the call to recv_bytes() throws: Process reader: Traceback (most recent call last): File "/home/james/.pyenv/versions/3.13.5...

Open Graph Description: Summary When using an asyncio.Event() with loop.add_reader() to asynchronously read from a multiprocessing.Pipe, the call to recv_bytes() throws: Process reader: Traceback (most recent call last): ...

X Description: Summary When using an asyncio.Event() with loop.add_reader() to asynchronously read from a multiprocessing.Pipe, the call to recv_bytes() throws: Process reader: Traceback (most recent call last): ...

Opengraph URL: https://github.com/MagicStack/uvloop/issues/686

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Asynchronous multiprocessing.Pipe reads throw when using uvloop","articleBody":"## Summary\n\nWhen using an `asyncio.Event()` with `loop.add_reader()` to asynchronously read from a `multiprocessing.Pipe`, the call to `recv_bytes()` throws:\n\n```\nProcess reader:\nTraceback (most recent call last):\n  File \"/home/james/.pyenv/versions/3.13.5/lib/python3.13/multiprocessing/process.py\", line 313, in _bootstrap\n    self.run()\n    ~~~~~~~~^^\n  File \"/home/james/.pyenv/versions/3.13.5/lib/python3.13/multiprocessing/process.py\", line 108, in run\n    self._target(*self._args, **self._kwargs)\n    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/james/code/connection_test.py\", line 25, in reader_wrapper\n    uvloop.run(async_reader(read_pipe))\n    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/james/code/.venv/lib/python3.13/site-packages/uvloop/__init__.py\", line 109, in run\n    return __asyncio.run(\n           ~~~~~~~~~~~~~^\n        wrapper(),\n        ^^^^^^^^^^\n    ...\u003c2 lines\u003e...\n        **run_kwargs\n        ^^^^^^^^^^^^\n    )\n    ^\n  File \"/home/james/.pyenv/versions/3.13.5/lib/python3.13/asyncio/runners.py\", line 195, in run\n    return runner.run(main)\n           ~~~~~~~~~~^^^^^^\n  File \"/home/james/.pyenv/versions/3.13.5/lib/python3.13/asyncio/runners.py\", line 118, in run\n    return self._loop.run_until_complete(task)\n           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^\n  File \"uvloop/loop.pyx\", line 1518, in uvloop.loop.Loop.run_until_complete\n  File \"/home/james/code/.venv/lib/python3.13/site-packages/uvloop/__init__.py\", line 61, in wrapper\n    return await main\n           ^^^^^^^^^^\n  File \"/home/james/code/connection_test.py\", line 20, in async_reader\n    message = read_pipe.recv_bytes()\n  File \"/home/james/.pyenv/versions/3.13.5/lib/python3.13/multiprocessing/connection.py\", line 216, in recv_bytes\n    buf = self._recv_bytes(maxlength)\n  File \"/home/james/.pyenv/versions/3.13.5/lib/python3.13/multiprocessing/connection.py\", line 437, in _recv_bytes\n    return self._recv(size)\n           ~~~~~~~~~~^^^^^^\n  File \"/home/james/.pyenv/versions/3.13.5/lib/python3.13/multiprocessing/connection.py\", line 395, in _recv\n    chunk = read(handle, remaining)\nBlockingIOError: [Errno 11] Resource temporarily unavailable\n```\n\nThis does not occur when running with `asyncio`\n\n## Environment\n\n    Python: 3.13.5\n    uvloop: 0.21.0\n\n## Reproduction\n\n```python\nimport asyncio\nimport uvloop\nfrom multiprocessing import Process\nfrom multiprocessing.connection import Connection, Pipe, wait\n\ndef writer(write_pipe: Connection):\n    message = b'!' * 65536\n    while True:\n        write_pipe.send_bytes(message)\n\nasync def async_reader(read_pipe: Connection):\n    message_available = asyncio.Event()\n    asyncio.get_running_loop().add_reader(\n        read_pipe.fileno(), message_available.set\n    )\n\n    while True:\n        await message_available.wait()\n        while read_pipe.poll():\n            message = read_pipe.recv_bytes()\n            print('Got message')\n        message_available.clear()\n\ndef reader_wrapper(read_pipe: Connection):\n    uvloop.run(async_reader(read_pipe))\n\nif __name__ == '__main__':\n    read_pipe, write_pipe = Pipe(duplex=False)\n\n    reader_process = Process(\n        name=\"reader\", target=reader_wrapper, args=(read_pipe,)\n    )\n    reader_process.start()\n\n    writer_process = Process(\n        name=\"writer\", target=writer, args=(write_pipe,)\n    )\n    writer_process.start()\n\n    wait([reader_process.sentinel, writer_process.sentinel])\n\n```","author":{"url":"https://github.com/judilsteve","@type":"Person","name":"judilsteve"},"datePublished":"2025-08-15T02:16:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/686/uvloop/issues/686"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:16489b13-de35-8454-f7d4-f4468eab99ee
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD8E8:286E94:2CABEB9:3ACA533:69649535
html-safe-nonce4d067fb7e4d72f06701a4aff31eaa85a2b446a6fbfca019596f9525ef40912bc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEU4OjI4NkU5NDoyQ0FCRUI5OjNBQ0E1MzM6Njk2NDk1MzUiLCJ2aXNpdG9yX2lkIjoiODcwNDc1MzczMTM0MjU1NDEzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac37e22d39aea821be914c9910f736b9f4c5423aa56586d6e682953bb7644b885f
hovercard-subject-tagissue:3324113350
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/MagicStack/uvloop/686/issue_layout
twitter:imagehttps://opengraph.githubassets.com/05519adfed5ecce4e0f7aa4b4a6c4b9338ccff7221f223f6f6b9807ac62d922b/MagicStack/uvloop/issues/686
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/05519adfed5ecce4e0f7aa4b4a6c4b9338ccff7221f223f6f6b9807ac62d922b/MagicStack/uvloop/issues/686
og:image:altSummary When using an asyncio.Event() with loop.add_reader() to asynchronously read from a multiprocessing.Pipe, the call to recv_bytes() throws: Process reader: Traceback (most recent call last): ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejudilsteve
hostnamegithub.com
expected-hostnamegithub.com
Nonebaa7d9900fdf7b27d604f36887af878d569cfbdcf97126832a5f4f0caf0c6ba5
turbo-cache-controlno-preview
go-importgithub.com/MagicStack/uvloop git https://github.com/MagicStack/uvloop.git
octolytics-dimension-user_id14324950
octolytics-dimension-user_loginMagicStack
octolytics-dimension-repository_id45766550
octolytics-dimension-repository_nwoMagicStack/uvloop
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id45766550
octolytics-dimension-repository_network_root_nwoMagicStack/uvloop
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release842eff1d11f899d02b6b3b98fa3ea4860e64b34e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/MagicStack/uvloop/issues/686#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FMagicStack%2Fuvloop%2Fissues%2F686
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FMagicStack%2Fuvloop%2Fissues%2F686
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=MagicStack%2Fuvloop
Reloadhttps://github.com/MagicStack/uvloop/issues/686
Reloadhttps://github.com/MagicStack/uvloop/issues/686
Reloadhttps://github.com/MagicStack/uvloop/issues/686
MagicStack https://github.com/MagicStack
uvloophttps://github.com/MagicStack/uvloop
Notifications https://github.com/login?return_to=%2FMagicStack%2Fuvloop
Fork 597 https://github.com/login?return_to=%2FMagicStack%2Fuvloop
Star 11.6k https://github.com/login?return_to=%2FMagicStack%2Fuvloop
Code https://github.com/MagicStack/uvloop
Issues 121 https://github.com/MagicStack/uvloop/issues
Pull requests 35 https://github.com/MagicStack/uvloop/pulls
Actions https://github.com/MagicStack/uvloop/actions
Projects 0 https://github.com/MagicStack/uvloop/projects
Wiki https://github.com/MagicStack/uvloop/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/MagicStack/uvloop/security
Please reload this pagehttps://github.com/MagicStack/uvloop/issues/686
Insights https://github.com/MagicStack/uvloop/pulse
Code https://github.com/MagicStack/uvloop
Issues https://github.com/MagicStack/uvloop/issues
Pull requests https://github.com/MagicStack/uvloop/pulls
Actions https://github.com/MagicStack/uvloop/actions
Projects https://github.com/MagicStack/uvloop/projects
Wiki https://github.com/MagicStack/uvloop/wiki
Security https://github.com/MagicStack/uvloop/security
Insights https://github.com/MagicStack/uvloop/pulse
New issuehttps://github.com/login?return_to=https://github.com/MagicStack/uvloop/issues/686
New issuehttps://github.com/login?return_to=https://github.com/MagicStack/uvloop/issues/686
Asynchronous multiprocessing.Pipe reads throw when using uvloophttps://github.com/MagicStack/uvloop/issues/686#top
https://github.com/judilsteve
https://github.com/judilsteve
judilstevehttps://github.com/judilsteve
on Aug 15, 2025https://github.com/MagicStack/uvloop/issues/686#issue-3324113350
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.