/// <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_); }
/// <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); } }