|
From: Brian G. <bri...@ea...> - 2016-11-26 15:50:07
|
On Nov 26, 2016, at 4:14 AM, Donal K. Fellows <don...@ma...> wrote: > > On 25/11/2016 15:47, Lucio Andrés Illanes Albornoz wrote: >> This TIP proposes to replace /select/(2) in the notifier implementation >> with /epoll/(7) and /kqueue/(2) on Linux and FreeBSD respectively. > > PROCESS NOTE > > While I generally approve of an improved notifier, I'm not sure that a TIP is necessary for doing so. All that scripts or users of Tcl's A API could possibly see would be improvements in efficiency, and those have never been subject to the TIP process in the past. :-) > > Still, it's fine to have one for informational purposes. Notifier implementations are an area that is sufficiently tricky that recording the thoughts of the author of the code is vastly valuable. > > IMPLEMENTATION THOUGHTS > > When it comes to the implementation, I'm wondering if it would be neater to have alternate files that implement the notifier, one for epoll, one for kqueue, and one for select (for platforms where we can't figure out something better). Then the configure script is (in this area) mainly just selecting which notifier implementation to use. That's how the notifier system is *supposed* to work, and it reduces the amount of #ifdef-fery required, to everyone's relief. Out of curiosity, would it be possible to select the notifier at runtime? Maybe via [package require]? I can see where this would be a once only selection, but it would allow different scripts to use different notifiers. -Brian |