Пример #1
0
        /// <summary>
        /// Makes the current thread execute the given method.
        /// </summary>
        /// <param name="target">The method to execute.</param>
        public void DoWork(ILuaValue target)
        {
            if (status_ != Status.Waiting)
            {
                throw new InvalidOperationException(
                          "The worker thread must be waiting to get a new task.");
            }

            Target  = new LuaThreadNet(E_, backing_, target);
            status_ = Status.Working;
            lock (lock_)
                Monitor.Pulse(lock_);
        }
Пример #2
0
        /// <summary>
        /// Makes the current thread execute the given method.
        /// </summary>
        /// <param name="target">The method to execute.</param>
        public void DoWork(ILuaValue target)
        {
            if (_status != Status.Waiting)
            {
                throw new InvalidOperationException(
                          "The worker thread must be waiting to get a new task.");
            }

            Target  = new LuaThreadNet(_env, _backing, target);
            _status = Status.Working;
            lock (_lock) {
                Monitor.Pulse(_lock);
            }
        }
Пример #3
0
        /// <summary>
        /// Makes the current thread execute the given method.
        /// </summary>
        /// <param name="target">The method to execute.</param>
        public void DoWork(ILuaValue target)
        {
            if (status_ != Status.Waiting)
            {
                throw new InvalidOperationException(
                    "The worker thread must be waiting to get a new task.");
            }

            Target = new LuaThreadNet(E_, backing_, target);
            status_ = Status.Working;
            lock (lock_)
                Monitor.Pulse(lock_);
        }