2021-06-17 11:38:30 +00:00
|
|
|
#lang syndicate
|
|
|
|
;;; SPDX-License-Identifier: LGPL-3.0-or-later
|
2023-01-16 14:57:29 +00:00
|
|
|
;;; SPDX-FileCopyrightText: Copyright © 2021-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
2021-06-17 11:38:30 +00:00
|
|
|
|
|
|
|
(require syndicate/drivers/timer)
|
|
|
|
|
|
|
|
(module+ test
|
2021-06-17 12:57:06 +00:00
|
|
|
(standard-actor-system (ds)
|
2021-06-17 11:38:30 +00:00
|
|
|
(spawn (at ds
|
|
|
|
(assert 'item)
|
|
|
|
(on (timeout 50) (stop-current-facet))))
|
|
|
|
(spawn #:daemon? #t
|
|
|
|
(at ds
|
|
|
|
(during/spawn 'item
|
|
|
|
#:name 'item-handler
|
|
|
|
(on-start (log-info "up"))
|
|
|
|
(on-stop (log-info "down")))))))
|