enthought / enthought/traitsui

Multi_thread_demo_2.py hangs at exit

Open
#1,743 4 comments 0 reactions 0 assignees View on GitHub
component: examples type: bug
Dominant language
Python
Stars
306
Forks
99
PR merge metrics
No merged PRs in 30d

Description

The [`Multi_thread_demo_2.py`](https://github.com/enthought/traitsui/blob/7f246271c7fc54212d0e9609db65baf1d7f603b5/traitsui/examples/demo/Advanced/Multi_thread_demo_2.py) demo script hangs at exit, when started from the command line.

Steps to reproduce (on macOS):

- Install `traitsui` and `pyside2` into a fresh EDM Python 3.6 environment
- Navigate to the examples directory and launch the script directly with `python Multi_thread_demo_2.py` from a Terminal window
- Create a few counters
- Close the window via the close button

At this point, control doesn't return to the shell prompt until Ctrl-C is pressed, interrupting the Python process with a `KeyboardInterrupt`.

This might be a good place to show good practices in terms of keeping track of, and eventually joining, threads.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.