Port removal, stop-on-nothing-to-do, and select when sleeping
authorChristopher Allan Webber <cwebber@dustycloud.org>
Tue, 1 Dec 2015 15:31:49 +0000 (09:31 -0600)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Tue, 1 Dec 2015 15:31:49 +0000 (09:31 -0600)
commit0a4fe47d9b6fe7c13296562b5408f68d0083da71
treec34cd064e83db84872914b4d66e3744daca77cad
parentb3da5056c59d51bd48bd8cfc6f573fce492e0974
Port removal, stop-on-nothing-to-do, and select when sleeping

The aligned goal here is to allow for removing ports, not busy-looping
when there's no ports but something to wait on, and allow for stopping
when nothing is remaining.  Accomplishing the latter requires all
of the former.

* 8sync/agenda.scm (<make-port-request>, make-port-remove-request)
  (port-remove-request port-remove-request?, stop-on-nothing-to-do):
  New variables.

  (update-agenda-from-select!): Sleep (via select, currently) when
  there's no ports in the queue but we still have things scheduled.

  (start-agenda): New comments
8sync/agenda.scm