Metadata-Version: 2.4
Name: k3thread
Version: 0.1.7
Summary: Thread utilities for daemon threads and exception sending
Author-email: Zhang Yanpo <drdr.xp@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/pykit3/k3thread
Project-URL: Documentation, https://k3thread.readthedocs.io
Keywords: thread,daemon,concurrent,exception
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: k3ut; extra == "dev"
Provides-Extra: publish
Requires-Dist: build; extra == "publish"
Requires-Dist: twine; extra == "publish"
Requires-Dist: pk3; extra == "publish"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.5; extra == "docs"
Requires-Dist: mkdocs-material>=9.0; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.24; extra == "docs"
Dynamic: license-file

# k3thread

[![Build Status](https://github.com/pykit3/k3thread/actions/workflows/python-package.yml/badge.svg)](https://github.com/pykit3/k3thread/actions/workflows/python-package.yml)
[![Documentation Status](https://readthedocs.org/projects/k3thread/badge/?version=stable)](https://k3thread.readthedocs.io/en/stable/?badge=stable)
[![Package](https://img.shields.io/pypi/pyversions/k3thread)](https://pypi.org/project/k3thread)

utility to create thread.

k3thread is a component of [pykit3] project: a python3 toolkit set.


k3thread is utility to create and operate thread.

Start a daemon thread after 0.2 seconds::

    >>> th = daemon(lambda :1, after=0.2)

Stop a thread by sending a exception::

    import time

    def busy():
        while True:
            time.sleep(0.1)

    t = daemon(busy)
    send_exception(t, SystemExit)




# Install

```
pip install k3thread
```

# Synopsis

```python
>>> th = daemon(lambda :1, after=0.2)

```

#   Author

Zhang Yanpo (张炎泼) <drdr.xp@gmail.com>

#   Copyright and License

The MIT License (MIT)

Copyright (c) 2015 Zhang Yanpo (张炎泼) <drdr.xp@gmail.com>


[pykit3]: https://github.com/pykit3
