Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added option for synchronous map loading #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

davenquinn
Copy link

In creating a module to be run in an Electron render thread, I was running into an apparent race condition with creating many pooled instances simultaneously on load (the issue seems similar to that in mapnik/mapnik#1459).

I was able to solve the issue by synchronously loading mapfiles using the map.fromStringSync method. Here, I've added this as an option (disabled by default) for mapnik-pool. I've added some tests and it appears that everything works well. There are no changes to the API except a boolean sync flag in initOptions.

davenquinn and others added 3 commits January 13, 2016 15:40
Sometimes there's a sneaky race condition with map initialization, which seems to be solved by loading maps synchronously.
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.

1 participant