{{ message }}
/ cpython Public

# asyncio: is it time to make ProactorEventLoop as the default event loop?#78868

Closed
opened this issue Sep 14, 2018 · 9 comments
Closed

# asyncio: is it time to make ProactorEventLoop as the default event loop? #78868

opened this issue Sep 14, 2018 · 9 comments
Labels

### vstinner commented Sep 14, 2018

 Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state. Show more details GitHub fields: assignee = None closed_at = created_at = labels = ['3.8', 'expert-asyncio'] title = 'asyncio: is it time to make ProactorEventLoop as the default event loop?' updated_at = user = 'https://github.com/vstinner' bugs.python.org fields: activity = actor = 'carltongibson' assignee = 'none' closed = True closed_date = closer = 'vstinner' components = ['asyncio'] creation = creator = 'vstinner' dependencies = [] files = [] hgrepos = [] issue_num = 34687 keywords = ['patch'] message_count = 9.0 messages = ['325391', '325394', '326361', '326363', '326424', '326641', '355210', '355211', '355215'] nosy_count = 5.0 nosy_names = ['vstinner', 'asvetlov', 'yselivanov', 'miss-islington', 'carltongibson'] pr_nums = ['9538', '9623'] priority = 'normal' resolution = 'fixed' stage = 'resolved' status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue34687' versions = ['Python 3.8'] The text was updated successfully, but these errors were encountered:

### vstinner commented Sep 14, 2018

 Is it time to make ProactorEventLoop as the default event loop? Since 2014, many features have been added to ProactorEventLoop (ex: SSL support) and the implementation is way more today than it was 4 years ago. Comparison of SelectorEventLoop and ProactorEventLoop on Windows: https://docs.python.org/dev/library/asyncio-platforms.html#windows

### 1st1 commented Sep 14, 2018

 I'm not sure that ProactorEventLoop is stable enough TBH :( And I wouldn't be able to be on call for Windows users to fix all bugs in ProactieEventLoop. Andrew, your thoughts on this?

### 1st1 commented Sep 25, 2018

 New changeset 6ea29c5 by Yury Selivanov (Victor Stinner) in branch 'master': bpo-34687: Make asynico use ProactorEventLoop by default (GH-9538) 6ea29c5

### vstinner commented Sep 25, 2018

 Thank you for the review Yury ;-)

### asvetlov commented Sep 26, 2018

 I think the only way to make sure that proactor event loop is stable -- starting to use it everywhere on Windows. Let's do it.

### miss-islington commented Sep 28, 2018

 New changeset 37aae9d by Miss Islington (bot) (Victor Stinner) in branch 'master': bpo-34687: Update asyncio doc for ProactorEventLoop (GH-9623) 37aae9d

### carltongibson mannequin commented Oct 23, 2019

 This change causes an issue in asgiref (and so Django) for Windows and Python 3.8. It looks as if ProactorEventLoop needs to check the current thread before triggering the signal... File "C:\Jenkins\workspace\django-windows\database\sqlite3\label\windows\python\Python38\.env\lib\site-packages\asgiref\sync.py", line 130, in _run_event_loop File "C:\Python38\lib\asyncio\proactor_events.py", line 679, in close signal.set_wakeup_fd(-1) ValueError: set_wakeup_fd only works in main thread  ... but I'm not familiar with the internals here as yet. (I'm guessing I need to create a new issue?)

### vstinner commented Oct 23, 2019

 (I'm guessing I need to create a new issue?) Please open a new issue.

### carltongibson mannequin commented Oct 23, 2019

 Thanks!

transferred this issue from another repository Apr 10, 2022