> > So if you just close the file descriptor, but don't remove it from the
> > task list, you'll get a "Key conflict" error when the next time a new
> > socket with that file descriptor number is assigned a 'task', or when
> > the event handler processing '*Run' passes the closed file descriptor to
> > select(2).
> what's the reason for running it via (task) in the first place?
A task is a piece of code to be run whenever a certain "event" happens.
An "event" is either the expiry of a timer, or the arrival of data on a
file descriptor. There may be several timers and many file descriptors
where the process is expecting something to happen, so they are all put
into a list in '*Run', and handled with I/O Multiplexing (the POSIX
select(2) system call).