agenda: Use suspendable ports feature from Guile 2.2.
This removes the old method of watching for when ports are updated via
select and explicitly calling a particular function, and instead can
simply suspend at the appropriate points using Guile's common I/O
procedures; the agenda handles waking things up when they're ready.
* 8sync/agenda.scm: Import `(ice-9 suspendable-ports)' and run
install-suspendable-ports!
(<agenda>, agenda-except-port-map, make-agenda): Drop except-port-map
from agenda. The "meaning" of read-port-map and write-port-map has
changed a bit too; these are still a hash-table of a port to a procedure
to be called when that port is available, but after being selected,
items are removed from the table.
(<port-request>, make-port-request, port-request, <port-remove-request>)
(port-remove-request, 8sync-port, 8sync-port-remove)
(agenda-handle-port-request!, agenda-handle-port-remove-request!): Remove.
(8sync-nowait): Move comment that was previously in 8sync-port here.
(update-agenda-from-select!): Update to use the new "meaning" of the
agenda-read-port-map and agenda-write-port-map and to drop referencing
the deprecated agenda-except-port-map. Properly removes items from
the read and write maps once they've been selected.
(<read-request>, <write-request>, agenda-handle-read-request)
(agenda-handle-write-request, wait-for-readable, wait-for-writable):
New variables.
(stop-on-nothing-to-do): Remove check on removed agenda-except-port-map.
(agenda-run-once): Parameterize the current-read-waiter and
current-write-waiter to wait-for-readable and wait-for-writable
respectively. Update handle-individual to use the new <read-request>
and <write-request> types.