Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Threadpool 1.2.7

    Download button

    No screenshots available
    Downloads: 361  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Christopher Arndt | More programs
    MIT/X Consortium Lic... / FREE
    October 8th, 2009, 01:07 GMT [view history]
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Threadpool description

    Easy to use object-oriented thread pool framework

    Threadpool is an easy to use object-oriented thread pool framework written in Python. A thread pool is an object that maintains a pool of worker threads to perform time consuming operations in parallel. It assigns jobs to the threads by putting them in a work request queue, where they are picked up by the next available thread. This then performs the requested operation in the background and puts the results in another queue.

    The thread pool object can then collect the results from all threads from this queue as soon as they become available or after all threads have finished their work. It's then possible to define callbacks to handle each result as it comes in.

    Note: This module is regarded as an extended example, not as a finished product. Feel free to adapt it too your needs.

    Basic usage:

    >>> pool = ThreadPool(poolsize)
    >>> requests = makeRequests(some_callable, list_of_args, callback)
    >>> [pool.putRequest(req) for req in requests]
    >>> pool.wait()



    Product's homepage

    Requirements:

    · Python

    What's New in This Release: [ read full changelog ]

    · Update reference to "Python In A Nutshell" to second edition (suggested by Alex Martelli).
    · Fixed typo in WorkerThread.run() (thanks to Nicholas Bollweg, Aaron Levinson, Rogério Schneider, Grégory Starck for reporting).
    · Fixed missing first argument in call to Queue.get() in WorkerThread.run() (thanks to Aaron Levinson for report).
    · Added new argument 'do_join' to ThreadPool.dismissWorkers(). When True, the method will perform Thread.join() on each thread after dismissing it.
    · Added joinAllDismissedWorkers method to ThreadPool to join dismissed threads at a later time (thanks to Aaron Levinson for patch for these two changes).

      


    TAGS:

    object-oriented framework | Python library | object-oriented | framework | Python

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM