diff options
| author | Lex Neva <github.com@lexneva.name> | 2023-01-30 23:55:18 -0500 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2023-02-16 22:54:21 -0500 |
| commit | b4612539585c1e9f4e75e0ad084da81f0ad758d3 (patch) | |
| tree | 75f68fb02a5106363bcd97e984dbe35a0d2c3dab /lib/stitches/fill.py | |
| parent | 30c73dc39c1ac814d0c63ec102c7f8c2b993fdd0 (diff) | |
make simulator threads pre-emptible
Diffstat (limited to 'lib/stitches/fill.py')
| -rw-r--r-- | lib/stitches/fill.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/stitches/fill.py b/lib/stitches/fill.py index 11c9259b..b3bb0bb7 100644 --- a/lib/stitches/fill.py +++ b/lib/stitches/fill.py @@ -11,6 +11,7 @@ from ..stitch_plan import Stitch from ..svg import PIXELS_PER_MM from ..utils import Point as InkstitchPoint from ..utils import cache +from ..utils.threading import check_stop_flag def legacy_fill(shape, angle, row_spacing, end_row_spacing, max_stitch_length, flip, staggers, skip_last): @@ -169,6 +170,8 @@ def intersect_region_with_grating(shape, angle, row_spacing, end_row_spacing=Non else: current_row_y += row_spacing + check_stop_flag() + return rows |
