Enable use of threads with tkinter
Project description
tkthread - Enable threads to interact with tkinter
Tk (in Python, tkinter) is not thread-safe. It's not possible to interact with a tkinter UI from a thread other than the one in which it is running its event loop.
There are a number of workarounds, but they generally boil down to doing some sort of polling, which either introduces delays, or is wasteful of CPU resource.
This package provides a 'bridge' between threads and tkinter that does not suffer from either of these problems; threads can run freely, and can schedule operations to be performed on a tkinter UI. Those operations will be picked up with minimal delay and executed asynchronously with the threads, but without incurring any polling cost.
The examples provided demonstrate the difference in CPU cost between a 'polling' solution and the one provided by this package.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file rjgtoys_tkthread-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: rjgtoys_tkthread-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4f87cc8a91c8868dde550fb65d8d09e13fa831fe159ba35f3d61a6b1c929f01 |
|
MD5 | 8fd363022c6ffa6a3d27fd6badd1ffee |
|
BLAKE2b-256 | e9bcf90c68afab0a6652cce45d880a4ef6bd621bfe5e6709d1cad58f359d16aa |