Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

document threading model #640

Closed
Closed

Description

@jfirebaugh
  • What threads does mapbox-gl-native create and what are their responsibilities?
  • What data is shared across threads and how do we know it's accessed safely?

@kkaefer Is #86 (comment) still an accurate diagram?

Activity

  1. kkaefer commented on Nov 25, 2014

    @kkaefer
    Member

    Yup, the diagram is still accurate.

    The lib creates these threads:

    • Map thread (= Render thread in the diagram): executes all of the rendering logic, determines what tiles to load, processes stylesheet changes.
    • libuv workpool: executes libuv callback functions like file/network IO
    • SQLite thread: does SQLite I/O and also compresses/decompresses data stored in the database
    • CURL thread (on implementations that use CURL): Runs all of the CURL requests in a multi handle. Reason this is in a separate thread is that incoming messages need to be decompressed, which is blocking.
    • worker pool: mbgl-managed pool of tile workers that process vector tiles and generate buckets.
  2. jfirebaugh commented on Jun 2, 2016

    @jfirebaugh
    ContributorAuthor

    Done in 49d3807.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions