public void apply(Map req, Writer out) {
public synchronized void apply(Map req, Writer out) {
        public void apply(Map req, Writer out) {            // analyze the request            String pageName = (String) req.get("page");            Promise promise = (Promise) promises.get(pageName);            promise.writeOn(out);        }