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

Thread startup shouldn't block on Actor<Object> construction #9666

Closed
jfirebaugh opened this issue Aug 1, 2017 · 1 comment
Closed

Thread startup shouldn't block on Actor<Object> construction #9666

jfirebaugh opened this issue Aug 1, 2017 · 1 comment
Labels
Core The cross-platform C++ core, aka mbgl

Comments

@jfirebaugh
Copy link
Contributor

The Thread constructor blocks until the spawned thread has constructed the object. For DefaultFileSource this includes creating the offline database, which could be a lengthy operation.

We should modify Thread so that it doesn't block. This will be tricky, requiring the ability to construct an ActorRef<Object> for an Object that might not have itself been constructed yet.

@jfirebaugh jfirebaugh added the Core The cross-platform C++ core, aka mbgl label Aug 1, 2017
@kkaefer
Copy link
Member

kkaefer commented Aug 25, 2017

Instead of changing our Actor system, we could make the OfflineDatabase construction faster by not opening the database in the constructor, and instead open it in a self-sent message as the first message processed for this object.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Core The cross-platform C++ core, aka mbgl
Projects
None yet
Development

No branches or pull requests

2 participants