Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #102210 > unrolled thread
| Started by | "Frank Millman" <frank@chagford.com> |
|---|---|
| First post | 2016-01-29 07:23 +0200 |
| Last post | 2016-01-29 07:23 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Question about asyncio and blocking operations "Frank Millman" <frank@chagford.com> - 2016-01-29 07:23 +0200
| From | "Frank Millman" <frank@chagford.com> |
|---|---|
| Date | 2016-01-29 07:23 +0200 |
| Subject | Re: Question about asyncio and blocking operations |
| Message-ID | <mailman.75.1454045022.2338.python-list@python.org> |
"Ian Kelly" wrote in message news:CALwzidn6NfT_O0cfHw1itWja81+MW3scHuEcADVCen3ix6z73w@mail.gmail.com... > > As I commented in my previous message, asyncio.Queue is not > thread-safe, so it's very important that the put calls here be done on > the event loop thread using event_loop.call_soon_threadsafe. This > could be the cause of the strange behavior you're seeing in getting > the results. > Using call_soon_threadsafe makes all the difference. The rows are now retrieved instantly. I have read the other messages, and I can see that there are some clever ideas there. However, having found something that seems to work and that I feel comfortable with, I plan to run with this for the time being. Thanks to all for the very stimulating discussion. Frank
Back to top | Article view | comp.lang.python
csiph-web