v1.2.0
tagb8ef6b4fb6c172c38abae2db1a04cf8a83afde3f
object 743560f8af768a65e6f286fecf80b6ebd91be812
authorEric Wong <e@yhbt.net>
Sat, 15 Jan 2011 12:06:03 +0000 (15 12:06 +0000)
sleepy_penguin 1.2.0 - epoll GC help

One convenience fix:

  epoll: prevent IO objects from getting GC-ed

  Users of our code may forget to keep references for their IO
  objects at all, and since it's not possible for GC to mark
  kernel memory, we just hold on to the IO objects for them.

  We can't unmark close()d file descriptors, ever, so we don't
  bother with the EPOLL_CTL_DEL case, either.  Just storing IO
  objects in an array using the raw descriptor as a key will allow
  bounded space usage just like the in-kernel FD tables as long
  as the user remembers to close descriptors themselves.