Exemple #1
0
        static void ThreadProc(Object stateInfo)
        {
            string        body         = (string)stateInfo;
            ParsingScript threadScript = new ParsingScript(body);

            threadScript.ExecuteAll();
        }
Exemple #2
0
        protected override Variable Evaluate(ParsingScript script)
        {
            string body = Utils.GetBodyBetween(script, Constants.START_ARG,
                                               Constants.END_ARG);
            ParsingScript threadScript = new ParsingScript(body);

            lock (lockObject) {
                threadScript.ExecuteAll();
            }
            return(Variable.EmptyInstance);
        }
Exemple #3
0
        protected override Variable Evaluate(ParsingScript script)
        {
            string body = Utils.GetBodyBetween(script, Constants.START_ARG,
                                               Constants.END_ARG);
            ParsingScript threadScript = new ParsingScript(body);

            // BUGBUG: Alfred - what is this actually locking?
            // Vassili - it's a global (static) lock. used when called from different threads
            lock (lockObject)
            {
                threadScript.ExecuteAll();
            }
            return(Variable.EmptyInstance);
        }