Branch: Tag:

2010-11-05

2010-11-05 21:51:52 by Martin Stjernholm <mast@lysator.liu.se>

Don't use threads in Process.run if we can avoid it (and we always can).

214:    "stderr":mystderr->pipe(),    ]));    - #if constant(Thread.Thread) + #if 0 //constant(Thread.Thread) +  // This is disabled by default since the callback alternative is +  // much more lightweight - creating threads isn't cheap.    array threads = ({    thread_create( lambda() { gotstdout = mystdout->read(); } ),    thread_create( lambda() { gotstderr = mystderr->read(); } )
229: Inside #if constant(Thread.Thread)
      exitcode = p->wait();    threads->wait(); - #else //No threads, use callbacks + #else    Pike.SmallBackend backend = Pike.SmallBackend();       mystdout->set_backend (backend);