Skip to main content

Native threading for Python using C++ and pybind11

Project description

Smuxent

v0.0.1 Smuxent is a lightweight native threading module for Python, backed by C++ and pybind11.
It allows you to easily launch background threads in Python using true native threads — with cooperative control and ID tracking.

This project was built for fun, learning, and utility. If you're using this, thanks! Feedback and suggestions are welcome though not sure where that'd be.

Currently supports: Python 3.12.2 on Windows (x64 and x86)


What It Does

  • Run Python functions in detached threads
  • Track threads by ID
  • Kill individual threads or all running threads
  • Track thread IDs and check if they are alive
  • Automatically loads the correct native extension based on system architecture

Example

from Smuxent import hello_thread, basic_thread

hello_thread(3)  # prints "Hello, Thread!" three times on another thread

def my_func():
    print("Running on another thread")

thread_id = basic_thread(my_func)  # runs my_func() on another thread, returning the thread ID

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smuxent-0.0.1a0.tar.gz (149.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smuxent-0.0.1a0-py3-none-any.whl (148.4 kB view details)

Uploaded Python 3

File details

Details for the file smuxent-0.0.1a0.tar.gz.

File metadata

  • Download URL: smuxent-0.0.1a0.tar.gz
  • Upload date:
  • Size: 149.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for smuxent-0.0.1a0.tar.gz
Algorithm Hash digest
SHA256 39e5864c1e631e289703e8b99822652f6ef2ffd027c05e0084437c25ff0d3ace
MD5 1eb685e1e35120a287e8c44c01ab2dd5
BLAKE2b-256 ca7f2f09529d97cea192d6a7b6aeaa1d36e6584af5edc78675809da70d390fbc

See more details on using hashes here.

File details

Details for the file smuxent-0.0.1a0-py3-none-any.whl.

File metadata

  • Download URL: smuxent-0.0.1a0-py3-none-any.whl
  • Upload date:
  • Size: 148.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for smuxent-0.0.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 594614529312de9ee5a9f84df20708dbe93bc37627db0191814943a7ff0e0a01
MD5 50d638b912d4950b8669760d262b576a
BLAKE2b-256 7bcd9f37a7e291d56c6c2704cd1af4f81aa7fb44470f0349bcc1b7a1dbd44224

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page