Skip to content

Main thread dispatch#1315

Open
timoore wants to merge 6 commits intomainfrom
main-thread-dispatch
Open

Main thread dispatch#1315
timoore wants to merge 6 commits intomainfrom
main-thread-dispatch

Conversation

@timoore
Copy link
Contributor

@timoore timoore commented Mar 4, 2026

Remove calls to asyncSystem::dispatchMainThreadTasks from tileset selection functions updateViewGroup, updateViewGroupOffline, and loadTiles. This is a breaking change; client applications need to call dispatchMainThreadTasks to make progress.

Addresses #605

Even though tests in
Cesium3DTilesSelection/test/TestTilesetHeightQueries.cpp pass with the
dispatch after loadTiles(), move it before in order to be consistant
with the order we've used elsewhere.
Copy link
Contributor

@j9liu j9liu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @timoore! This looks good for the most part, just saw what I assume was accidental misordering in the unit tests.

Comment on lines 462 to +463
tileset.loadTiles();
tilesetExternals.asyncSystem.dispatchMainThreadTasks();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason this is after loadTiles and not before?

Comment on lines 738 to +739
tileset.loadTiles();
tilesetExternals.asyncSystem.dispatchMainThreadTasks();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this is maybe a copy paste error -- fix order?

Comment on lines 1320 to +1321
tileset.loadTiles();
tilesetExternals.asyncSystem.dispatchMainThreadTasks();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix order?

Comment on lines 1028 to +1029
tileset.loadTiles();

tilesetExternals.asyncSystem.dispatchMainThreadTasks();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix order?

Comment on lines 1778 to +1779
tileset.loadTiles();
tilesetExternals.asyncSystem.dispatchMainThreadTasks();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix order?

Comment on lines 1799 to +1800
tileset.loadTiles();
tilesetExternals.asyncSystem.dispatchMainThreadTasks();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix order?

@timoore
Copy link
Contributor Author

timoore commented Mar 10, 2026

The tests themselves did have some explicit calls to dispatchMainThreadTasks() already, and they were placed after loadTiles(), so when I was first getting the tests working I put the new calls after too. I'll investigate and see if they can before or if they are still needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants