Repository navigation
Withdraw queued AutoCAD calls when their caller times out - #5
Merged
Merged
Conversation
When AutoCAD sits at a dialog, the call in progress hangs and run() gives up, but anything the model sends next (usually the same drawing again) stays in the COM queue and runs once the dialog is closed, even though its caller was already told it failed. run() now cancels a call that has not started, and the timeout message says whether the request was withdrawn or may still finish, so the model knows to check before resending. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When AutoCAD is stuck at a dialog, the running call times out, but any call queued behind it stayed in the COM queue and ran after the dialog closed, even though its caller had already got an error. So a retried draw_batch could end up drawn twice. run() now cancels a call that never started, and the timeout message says whether the request was withdrawn or may still complete. The new tests/test_bridge_timeout.py fails on main (the abandoned call runs) and passes here; the full suite is 46 tests OK on Python 3.13. Not tried against a live AutoCAD with a real modal dialog.