Re: Plugin threading model in Electrolysis
Chris Jones <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Message-ID | <[email protected]> |
Zack Weinberg wrote: > Chris Jones <[email protected]> wrote: >> We can implement the rendezvous by creating a heartbeat timer in the >> plugin process that fires at X Hz (X might be 120). When that timer >> fires, we know that the plugin is idle and ready to receive messages. >> So the timer callback sends a Rendezvous() message to the browser, >> and if the browser has outstanding events in its queue, it processes >> them normally. Otherwise, the browser responds to the Rendezvous() >> immediately, and the rendezvous is a no-op. > > This is going to do bad things for power saving. Can't we find a > solution that lets the plugin process go completely idle (== block on > select() or equivalent indefinitely) when there's nothing to do? > It's probably possible somehow to notify the child process when the parent has events to deliver to it. Having the child wait on data being sent to a pipe would probably work; the parent would send a byte to the pipe when it received an event to be delivered. Cheers, Chris