~mil/mepo-tickets#8: 
Rework TileCache concurrency model

TileCache's tile_retrieve is used for rendering tiles (which fetches tiles and also pushes into queue if not found).

Underlying Lifo datastructure is thread-safe but is a blunt mechanism since there is lots of locking/unlocking on sub-calls since curl multi logic also uses this same code (and thus locks).

Result is jagged dragging. #6 is one potential solution. Also another idea is to move mutex up to TileCache public functions itself and then remove thread-saftey/mutex logic from Lifo which would result in less intermittent locking.

Goal: as little locking on SDL rendering thread as possible.

Status
RESOLVED FIXED
Submitter
~mil
Assigned to
No-one
Submitted
a month ago
Updated
12 days ago
Labels
No labels applied.

~mil a month ago

Idea: integrate SDL loop & curl loop (FD/select) and then only run curl processing logic when SDL event queue empty

~mil REPORTED FIXED 12 days ago

More or less solved. Mutex was moved up and locking is alot less noticeable currently.

Minor improvements can still be made / #6 will remain open

Register here or Log in to comment, or comment via email.