[issue40811] Allow to create new Event Loops on Threads

2022-03-17 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I suggest closing.
The documentation explicitly describes how asyncio works with threads.

--
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40811] Allow to create new Event Loops on Threads

2021-05-19 Thread Irit Katriel


Irit Katriel  added the comment:

Should this be closed as rejected or is there further discussion?

--
nosy: +iritkatriel

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40811] Allow to create new Event Loops on Threads

2020-05-28 Thread Christian Heimes


Christian Heimes  added the comment:

The default policy of asyncio deliberately limits automatic creation of event 
loops to the main thread. You can't just mix asyncio with a threaded web 
application and expect it to work correctly.

See 
https://github.com/python/cpython/blob/a487a39dca4c41305928c7dfdbcb0b3aa344683b/Lib/asyncio/events.py#L609-L620

In this policy, each thread has its own event loop.  However, we
only automatically create an event loop by default for the main
thread; other threads by default have no event loop.

Other policies may have different rules (e.g. a single global
event loop, or automatically creating an event loop per thread, or
using some other notion of context to which an event loop is
associated).

--
nosy: +christian.heimes

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40811] Allow to create new Event Loops on Threads

2020-05-28 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 3.0 -> 4.0
pull_requests: +19748
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20500

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40811] Allow to create new Event Loops on Threads

2020-05-28 Thread Christian Exposito


New submission from Christian Exposito :

Right now, Async IO module is not automatically creating a new event loop on 
threads that are not the main thread 
(https://github.com/python/cpython/blob/master/Lib/asyncio/events.py#L638), but 
it should be interesting to do it. For example, WSGI applications handle web 
requests by spawning a new thread. If we allow Async IO module to create event 
loops on those threads, we will improve its adoption for developing web 
applications.

--
components: asyncio
messages: 370257
nosy: Christian Exposito, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Allow to create new Event Loops on Threads
type: behavior
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com