FAQ
Hi,

Are there any reasons besides personal preference to use one
particular threading library over the other? Eventlet, Twisted, and
Python's native Threading class, or are there even others? Are there
any licensing or redistribution restrictions that I should be worried
about? Which ones do you consider best documented? Most thread-safe?
Efficient?

Ultimately this will be used for asynchronous SNMP, HTTP, and WMI. I
don't think this will need to evolve into a multi-process project,
unless of course that is much easier to do than multi-threading?

Thanks,

Dennis O.

Search Discussions

  • Chris Angelico at Jun 12, 2011 at 5:01 am

    On Sun, Jun 12, 2011 at 2:10 PM, Dennis wrote:
    Hi,

    Are there any reasons besides personal preference to use one
    particular threading library over the other? ?Eventlet, Twisted, and
    Python's native Threading class, or are there even others? ?Are there
    any licensing or redistribution restrictions that I should be worried
    about? ?Which ones do you consider best documented? ?Most thread-safe?
    Efficient?
    I use the native Threading class, myself, largely because it's so easy
    to switch to multiprocessing if the GIL starts to get in the way. YMMV
    if you don't use CPython.
    Ultimately this will be used for asynchronous SNMP, HTTP, and WMI. ?I
    don't think this will need to evolve into a multi-process project,
    unless of course that is much easier to do than multi-threading?
    In all probability, your threads will spend 99% of their time waiting
    for the network. This makes threads very effective, and largely
    eliminates the GIL issues (if they occasionally have to take turns,
    it's not going to affect things much). Pick whichever threading
    library suits your coding style; they'll all work, most likely.

    Chris Angelico

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJun 12, '11 at 4:10a
activeJun 12, '11 at 5:01a
posts2
users2
websitepython.org

2 users in discussion

Chris Angelico: 1 post Dennis: 1 post

People

Translate

site design / logo © 2022 Grokbase