+(define (stop-on-nothing-to-do agenda)
+ (and (q-empty? (agenda-queue agenda))
+ (schedule-empty? (agenda-schedule agenda))
+ (= 0 (hash-count (const #t) (agenda-read-port-map agenda)))
+ (= 0 (hash-count (const #t) (agenda-write-port-map agenda)))
+ (= 0 (hash-count (const #t) (agenda-except-port-map agenda)))))
+
+