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

Resolve paths for views asynchronously #2653

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

Conversation

aredridel
Copy link
Contributor

This eliminates the only post-startup synchronous I/O in Express.

In addition, this makes the view.lookup method non-private, intended to be used
by view engines to resolve paths to partials, and, if the View class is
extended, could be used for other resources such as internationalized messages.

@dougwilson
Copy link
Contributor

Nice! Anyway we can add to this a way to prevent stampeding (which the sync version protected from) to the default lookup implementation?

@aredridel
Copy link
Contributor Author

Oh, yes! I think I could work that in.

@aredridel
Copy link
Contributor Author

Updated.

This allows extended view classes to implement more interesting lookup
methods without changing the interface. Removed useless ext parameter.
@gabrielcsapo
Copy link

👍

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

Successfully merging this pull request may close these issues.

4 participants