Exemple #1
0
        /**
         * Returns a parsed or compiled quercus program.
         *
         * @param path the source file path
         *
         * @return the parsed program
         *
         *
         */
        public QuercusPage parse(Path path, string fileName, int line)

        {
            string fullName = path.getFullPath();

            try {
                Object lock = _programLockMap.get(fullName);

                while (lock == null)
                {
                    lock = new Object();
                    _programLockMap.putIfAbsent(fullName, lock);

                    lock = _programLockMap.get(fullName);
                }

                synchronized(lock)
                {
                    return(parseImpl(path, fileName, line));
                }
            } finally {
                _programLockMap.remove(fullName);
            }
        }