xthread


Namexthread JSON
Version 0.0.2 PyPI version JSON
download
home_page
SummaryUseful threading for pause/unpause and terminating
upload_time2023-07-14 02:22:34
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords thread threading
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <img width="420px" src="https://i.ibb.co/0BPYdRk/xthread.png" alt='xthread'>
</p>
<p align="center">
    <em>Threading for human.</em>
</p>
<p align="center">
    <a href="https://github.com/magiskboy/xthread/actions">
        <img src="https://github.com/magiskboy/xthread/actions/workflows/test-suite.yml/badge.svg" alt="Build Status">
    </a>
    <a href="https://codecov.io/gh/magiskboy/xthread" > 
        <img src="https://codecov.io/gh/magiskboy/xthread/branch/master/graph/badge.svg?token=uXPvINHpRs"/> 
    </a>
    <a href="https://pypi.org/project/xthread/">
        <img src="https://img.shields.io/pypi/dd/xthread" alt="Download PyPi">
    </a>
    <a href="https://github.com/magiskboy/xthread/blob/main/LICENSE">
        <img src="https://img.shields.io/github/license/magiskboy/xthread" alt="MIT">
    </a>
    <a href="https://pypi.org/project/xthread/">
        <img src="https://img.shields.io/pypi/pyversions/xthread" alt="Py version">
    </a>
    <a href="https://pypi.org/project/xthread/">
        <img src="https://img.shields.io/pypi/v/xthread" alt="PyPi version">
    </a>
</p>


## Features

Some of main features:

- Support pause/unpause
- Support termination thread non-preemtively

## Installation

You can install xthread from PyPi

```bash
$ pip install xthread
```

## Usage

```python
import time
from xthread import Thread

def target(executor):
    print("Running...")
    time.sleep(1)

thread = Thread(target)

# Running...
# Running...

thread.pause()

thread.unpause()

# Running...
# Running...

thread.stop()
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "xthread",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "thread,threading",
    "author": "",
    "author_email": "Nguyen Khac Thanh <nguyenkhacthanh244@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/19/30/23c699dc85200972f8aa0c65c2f19307257f66ae2aea700c426a18c79476/xthread-0.0.2.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <img width=\"420px\" src=\"https://i.ibb.co/0BPYdRk/xthread.png\" alt='xthread'>\n</p>\n<p align=\"center\">\n    <em>Threading for human.</em>\n</p>\n<p align=\"center\">\n    <a href=\"https://github.com/magiskboy/xthread/actions\">\n        <img src=\"https://github.com/magiskboy/xthread/actions/workflows/test-suite.yml/badge.svg\" alt=\"Build Status\">\n    </a>\n    <a href=\"https://codecov.io/gh/magiskboy/xthread\" > \n        <img src=\"https://codecov.io/gh/magiskboy/xthread/branch/master/graph/badge.svg?token=uXPvINHpRs\"/> \n    </a>\n    <a href=\"https://pypi.org/project/xthread/\">\n        <img src=\"https://img.shields.io/pypi/dd/xthread\" alt=\"Download PyPi\">\n    </a>\n    <a href=\"https://github.com/magiskboy/xthread/blob/main/LICENSE\">\n        <img src=\"https://img.shields.io/github/license/magiskboy/xthread\" alt=\"MIT\">\n    </a>\n    <a href=\"https://pypi.org/project/xthread/\">\n        <img src=\"https://img.shields.io/pypi/pyversions/xthread\" alt=\"Py version\">\n    </a>\n    <a href=\"https://pypi.org/project/xthread/\">\n        <img src=\"https://img.shields.io/pypi/v/xthread\" alt=\"PyPi version\">\n    </a>\n</p>\n\n\n## Features\n\nSome of main features:\n\n- Support pause/unpause\n- Support termination thread non-preemtively\n\n## Installation\n\nYou can install xthread from PyPi\n\n```bash\n$ pip install xthread\n```\n\n## Usage\n\n```python\nimport time\nfrom xthread import Thread\n\ndef target(executor):\n    print(\"Running...\")\n    time.sleep(1)\n\nthread = Thread(target)\n\n# Running...\n# Running...\n\nthread.pause()\n\nthread.unpause()\n\n# Running...\n# Running...\n\nthread.stop()\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Useful threading for pause/unpause and terminating",
    "version": "0.0.2",
    "project_urls": {
        "Changelog": "https://github.com/magiskboy/xthread/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/magiskboy/xthread#features",
        "Homepage": "https://github.com/magiskboy/xthread",
        "Issues": "https://github.com/magiskboy/xthread/issues/",
        "Source": "https://github.com/magiskboy/xthread"
    },
    "split_keywords": [
        "thread",
        "threading"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "90b7c32f553812e59a3c505c9c9016596bdf80e64efb291f1815805d146e34c1",
                "md5": "716e6e1231158f77a09ce102d3d10af8",
                "sha256": "f77a28765f42f9f108757dff3e3308d88360290daf3d5d64184b020edb2b9b2c"
            },
            "downloads": -1,
            "filename": "xthread-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "716e6e1231158f77a09ce102d3d10af8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 3459,
            "upload_time": "2023-07-14T02:22:33",
            "upload_time_iso_8601": "2023-07-14T02:22:33.545821Z",
            "url": "https://files.pythonhosted.org/packages/90/b7/c32f553812e59a3c505c9c9016596bdf80e64efb291f1815805d146e34c1/xthread-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "193023c699dc85200972f8aa0c65c2f19307257f66ae2aea700c426a18c79476",
                "md5": "8225b926c1c9ced86e8211acc4dd6bcf",
                "sha256": "316a9c0d70a193532432f40d4c7d95045af2a4ac49b0de8bc081c7eb8c637f26"
            },
            "downloads": -1,
            "filename": "xthread-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "8225b926c1c9ced86e8211acc4dd6bcf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 6514,
            "upload_time": "2023-07-14T02:22:34",
            "upload_time_iso_8601": "2023-07-14T02:22:34.893523Z",
            "url": "https://files.pythonhosted.org/packages/19/30/23c699dc85200972f8aa0c65c2f19307257f66ae2aea700c426a18c79476/xthread-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-14 02:22:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "magiskboy",
    "github_project": "xthread",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "xthread"
}
        
Elapsed time: 0.26426s