From: nobu.nokada@... Date: 2005-06-26T22:22:40+09:00 Subject: Re: speeding up Process.detach frequency Hi, At Sun, 26 Jun 2005 19:28:09 +0900, Yukihiro Matsumoto wrote in [ruby-talk:146512]: > |> |It seems like a bug of Process.detach. After it received the > |> |termination, it unnecessarily waits for one second again. > |> > |> Right. But using rb_waitpid() withouth WNOHANG does busy-wait. > | > |It should check periodically once per 0.06sec in > |rb_thread_polling(). > > Isn't it too often for most of the cases? I don't think it is a too heavy process, though it would not be a problem if it were less frequent. > |Or if it's not enough, a patch to use SIGCHLD. > > I'm not sure if SIGCHLD is available on non-UNIX platforms. Of course not, but nothing will change on such platforms. And it would be possible to emulate it, e.g., a watcher native thread could wake up a ruby thread waiting for a child. -- Nobu Nakada