guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#62584] [PATCH] services: Add error/success service type.


From: 宋文武
Subject: [bug#62584] [PATCH] services: Add error/success service type.
Date: Sat, 01 Apr 2023 18:34:54 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Ludovic Courtès <ludo@gnu.org> writes:

> I think it’s good to have it by default, but that’s something we can
> discuss.

Okay, I don't think so...

> +(define (error/success-boot-gexp _)
> +  #~(begin
> +      (display "error in finalization thread: Success\n"
> +               (current-error-port))
> +      (sleep 2)))           ;let the user notice--all this hasn't been in 
> vain

How about make the message and delay customable?

I prefer "No error in finalization thread: Success",
and 2 seconds may not be enough for a slow reader like me!

> +
> +(define error/success-service-type
> +  (service-type
> +   (name 'error/success)
> +   (extensions
> +    (list (service-extension boot-service-type
> +                             error/success-boot-gexp)))
> +   (default-value 42)

What are this 42 is for?


Otherwise look good to me, thank you!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]