Metadata-Version: 2.1
Name: lox
Version: 0.7.0
Summary: Threading and Multiprocessing for every project.
Home-page: https://github.com/BrianPugh/lox
Author: Brian Pugh
Author-email: bnp117@gmail.com
License: MIT license
Description: .. image:: https://raw.githubusercontent.com/BrianPugh/lox/master/assets/lox_200w.png
        
        
        .. image:: https://img.shields.io/pypi/v/lox.svg
                :target: https://pypi.python.org/pypi/lox
        
        .. image:: https://circleci.com/gh/BrianPugh/lox.svg?style=svg
                :target: https://circleci.com/gh/BrianPugh/lox
        
        .. image:: https://readthedocs.org/projects/lox/badge/?version=latest
                :target: https://lox.readthedocs.io/en/latest/?badge=latest
                :alt: Documentation Status
        
        .. image:: https://pyup.io/repos/github/BrianPugh/lox/shield.svg
                :target: https://pyup.io/repos/github/BrianPugh/lox/
                :alt: Updates
        
        
        Threading and multiprocessing made easy.
        
        
        * Free software: MIT license
        * Documentation: https://lox.readthedocs.io.
        * Python >=3.6
        
        
        **Lox** provides decorators and synchronization primitives to quickly add 
        concurrency to your projects.
        
        Installation
        ------------
        
            pip3 install --user lox
        
        Features
        --------
        
        * **Multithreading**: Powerful, intuitive multithreading in just 2 additional lines of code.
        
        * **Multiprocessing**: Truly parallel function execution with the same interface as **multithreading**.
        
        * **Synchronization**: Advanced thread synchronization, communication, and resource management tools.
        
        Todos
        -----
        
        * All objects except ``lox.process`` are for threads. These will eventually be multiprocess friendly.
        
        Usage
        -----
        
        Easy Multithreading
        ^^^^^^^^^^^^^^^^^^^
        
            >>> import lox
            >>>
            >>> @lox.thread(4) # Will operate with a maximum of 4 threads
            ... def foo(x,y):
            ...     return x*y
            >>> foo(3,4) # normal function calls still work
            12
            >>> for i in range(5):
            ...     foo.scatter(i, i+1)
            -ignore-
            >>> # foo is currently being executed in 4 threads
            >>> results = foo.gather() # block until results are ready
            >>> print(results) # Results are in the same order as scatter() calls
            [0, 2, 6, 12, 20]
        
        Easy Multiprocessing
        ^^^^^^^^^^^^^^^^^^^^
        
            >>> import lox
            >>>
            >>> @lox.process(4) # Will operate with a pool of 4 processes
            ... def foo(x,y):
            ...     return x*y
            >>> foo(3,4) # normal function calls still work
            12
            >>> for i in range(5):
            ...     foo.scatter(i, i+1)
            -ignore-
            >>> # foo is currently being executed in 4 processes
            >>> results = foo.gather() # block until results are ready
            >>> print(results) # Results are in the same order as scatter() calls
            [0, 2, 6, 12, 20]
        
        
        
        =======
        History
        =======
        
        0.7.0 (2020-07-20)
        ------------------
        * Complete rework of workers
          + Fix memory leaks
        * Drop support for python3.5
        * Drop support for chaining in favor of simpler codebase
        
        0.6.3 (2019-07-30)
        ------------------
        * Alternative fix for 0.6.2.
        
        0.6.2 (2019-07-21)
        ------------------
        * Update dependencies
        * Fix garbage-collecting exclusiviity
        
        0.6.1 (2019-07-21)
        ------------------
        * Fix memory leak in ``lox.process``.
        
        0.6.0 (2019-07-21)
        ------------------
        
        * ``lox.Announcement`` ``subscribe()`` calls now return another ``Announcement``
          object that behaves like a queue instead of an actual queue. Allows for 
          many-queue-to-many-queue communications.
        
        * New Object: ``lox.Funnel``. allows for waiting on many queues for a complete
          set of inputs indicated by a job ID.
        
        0.5.0 (2019-07-01)
        ------------------
        
        * New Object: ``lox.Announcement``. Allows a one-to-many thread queue with 
          backlog support so that late subscribers can still get all (or most recent) 
          announcements before they subscribed.
        
        * New Feature: ``lox.thread``  ``scatter`` calls can now be chained together.
          ``scatter`` now returns an ``int`` subclass that contains metadata to allow 
          chaining. Each scatter call can have a maximum of 1 previous ``scatter`` result.
        
        * Documentation updates, theming, and logos
        
        0.4.3 (2019-06-24)
        ------------------
        * Garbage collect cached decorated object methods
        
        0.4.2 (2019-06-23)
        ------------------
        * Fixed multiple instances and successive scatter and gather calls to wrapped methods
        
        0.4.1 (2019-06-23)
        ------------------
        * Fixed broken workers and unit tests for workers
        
        0.4.0 (2019-06-22)
        ------------------
        * Semi-breaking change: **lox.thread** and **lox.process** now automatically pass
          the object instance when decorating a method.
        
        0.3.4 (2019-06-20)
        ------------------
        * Print traceback in red when a thread crashes
        
        0.3.3 (2019-06-19)
        ------------------
        * Fix bug where thread in scatter of lox.thread double releases on empty queue
        
        0.3.2 (2019-06-17)
        ------------------
        
        * Fix manifest for installation from wheel
        
        0.3.1 (2019-06-17)
        ------------------
        
        * Fix package on pypi
        
        0.3.0 (2019-06-01)
        ------------------
        
        * Multiprocessing decorator. **lox.pool** renamed to **lox.thread**
        
        * Substantial pytest bug fixes
        
        * Documentation examples
        
        * timeout for RWLock
        
        0.2.1 (2019-05-25)
        ------------------
        
        * Fix IndexSemaphore context manager
        
        0.2.0 (2019-05-24)
        ------------------
        
        * Added QLock
        
        * Documentation syntax fixes
        
        0.1.1 (2019-05-24)
        ------------------
        
        * CICD test
        
        0.1.0 (2019-05-24)
        ------------------
        
        * First release on PyPI.
        
Keywords: lox
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/x-rst
