Repository navigation
Load vector datasets asynchronously (#36) - #85
Merged
Merged
Conversation
- Add versioned asynchronous vector-load API and shared completion delivery. - Prepare data off-thread, commit on the owner thread, and preserve synchronous loading. - Cover completion, cancellation, failures, and shutdown; update docs and plan. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Critical lifecycle defects let End consume results before owner-thread finalization and allow replayed completion to overwrite a successful load, while regression tests leave notification ordering and destruction timing unverified.
4 open issues
What changed in this PR
Adds asynchronous vector loading to the ActiveX control, moving dataset opening and scene preparation off the host’s apartment thread while preserving synchronous loading and existing COM interfaces.
Changes:
- Adds begin, cancel, and end methods through
IMapWinGISControl5. - Reuses the GDAL dispatcher and completion event, committing prepared layers on the owner thread.
- Adds asynchronous-load tests and updates API, architecture, and lifecycle documentation.
Builds and tests were not run during this review.
| File | Description |
|---|---|
tests/MapWinGIS.ActiveX.Tests/ActiveXActivationTests.cpp |
Adds load, cancellation, failure, lifetime, and interface tests. |
src/MapWinGIS.ActiveX/MapWinGISControl.h |
Declares asynchronous loading methods and operation state. |
src/MapWinGIS.ActiveX/MapWinGISControl.cpp |
Implements preparation, cancellation, result retrieval, and owner-thread commit. |
src/MapWinGIS.ActiveX/MapWinGIS.ActiveX.idl |
Adds the versioned IMapWinGISControl5 interface. |
src/MapWinGIS.ActiveX/GdalOperationDispatcher.h |
Declares custom worker callbacks and completion-result access. |
src/MapWinGIS.ActiveX/GdalOperationDispatcher.cpp |
Supports custom work and completed-result updates. |
src/MapWinGIS.ActiveX/GdalEventSource.h |
Declares owner-thread completion callbacks. |
src/MapWinGIS.ActiveX/GdalEventSource.cpp |
Runs completion callbacks before notifying clients. |
README.md |
Introduces asynchronous vector loading. |
docs/TESTING.md |
Describes the added test coverage. |
docs/PORTING.md |
Documents the new interface and loading behavior. |
docs/gdal-integration.md |
Explains shared completion events and result retrieval. |
docs/ARCHITECTURE.md |
Documents worker preparation, owner-thread commit, and lifecycle behavior. |
.github/plans/development-review-fix-plan-20261113.md |
Records Phase 9 completion and reported validation. |
.ai/memory/architecture/activex.md |
Updates the documented automation interface structure. |
Review effort: Balanced
- Wait for owner-thread finalization before consuming results - Ignore replayed completions after a layer is committed - Verify notification ordering and control destruction with deterministic tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.


Adds asynchronous vector loading to the ActiveX control so dataset opening and scene preparation do not block the host's apartment thread.
IMapWinGISControl5adds begin, cancel, and end methods. Work uses the existing GDAL dispatcher and completion event; the control commits the prepared candidate on its owner thread before notifying clients. Synchronous loading and existing COM interfaces remain unchanged. No new dependencies are required.CMake Debug x64 build and all 430 CTest cases passed (three opt-in cases skipped). MSBuild Debug x64 built with zero warnings; Core and ActiveX tests passed, with one and three opt-in skips respectively.