express icon indicating copy to clipboard operation
express copied to clipboard

Resolve paths for views asynchronously

Open aredridel opened this issue 9 years ago • 4 comments

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.

aredridel avatar May 18 '15 17:05 aredridel

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

dougwilson avatar May 18 '15 18:05 dougwilson

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

aredridel avatar May 18 '15 18:05 aredridel

Updated.

aredridel avatar May 18 '15 19:05 aredridel

👍

gabrielcsapo avatar Jun 16 '16 17:06 gabrielcsapo