AjTalk.Language.Process.Start C# (CSharp) Метод

Start() публичный Метод

public Start ( ) : void
Результат void
        public void Start()
        {
            ThreadStart start = new ThreadStart(this.Run);
            this.thread = new Thread(start);
            this.thread.Start();
        }

Usage Example

Пример #1
0
        public void RunProcess()
        {
            AutoResetEvent handle = new AutoResetEvent(false);
            Machine machine = new Machine();
            machine.SetGlobalObject("handle", handle);
            Block block = (new VmCompiler()).CompileBlock("handle !Set");

            Process process = new Process(block, null, machine);

            process.Start();

            if (!handle.WaitOne(500))
                Assert.Fail("Process didn't run");
        }