Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #68267

Re: which async framework?

References (4 earlier) <mailman.8056.1394563452.18130.python-list@python.org> <877g80nzdx.fsf@elektro.pacujo.net> <mailman.8064.1394577523.18130.python-list@python.org> <87wqg0mihv.fsf@elektro.pacujo.net> <CAPTjJmrRaM2tU_-k=W9JOG0YKSsnW_=z4OrXRQJxHcf9HTDUUg@mail.gmail.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2014-03-12 03:58 -0600
Subject Re: which async framework?
Newsgroups comp.lang.python
Message-ID <mailman.8079.1394618378.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Mar 11, 2014 at 5:38 PM, Chris Angelico <rosuav@gmail.com> wrote:
> On Wed, Mar 12, 2014 at 10:18 AM, Marko Rauhamaa <marko@pacujo.net> wrote:
>> Chris Angelico <rosuav@gmail.com>:
>>
>>> What corner cases are there with threads that you don't have with
>>> anything else?
>>
>> There are numerous. Here's one example: deadlocks due to two threads
>> taking locks in a different order. The problem crops up naturally with
>> two intercommunicating classes. It can sometimes be very difficult to
>> spot or avoid.
>
> Yep. Now how is that not a problem when you use some other model, like
> an event loop? The standard methods of avoiding deadlocks (like
> acquiring locks in strict order) work exactly the same for all models,
> and are just as necessary.

If you don't have threads then the only locks you need to acquire are
for external resources.  You might still deadlock, but at least your
process won't be deadlocking with itself.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: which async framework? Antoine Pitrou <solipsis@pitrou.net> - 2014-03-11 18:43 +0000
  Re: which async framework? Marko Rauhamaa <marko@pacujo.net> - 2014-03-12 00:28 +0200
    Re: which async framework? Chris Angelico <rosuav@gmail.com> - 2014-03-12 09:38 +1100
      Re: which async framework? Marko Rauhamaa <marko@pacujo.net> - 2014-03-12 01:18 +0200
        Re: which async framework? Chris Angelico <rosuav@gmail.com> - 2014-03-12 10:38 +1100
          Re: which async framework? Marko Rauhamaa <marko@pacujo.net> - 2014-03-12 02:10 +0200
        Re: which async framework? Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-12 03:58 -0600

csiph-web