On Sun, Oct 28, 2012 at 11:07:30AM -0400, Felix wrote: > > From: Felix <[email protected]> > > Subject: [PATCH] process-fork: option to kill all but the current thread in > > the child process > > Date: Sun, 28 Oct 2012 09:10:41 -0400 (EDT) > > > >> This patch allows "process-fork" to kill all existing threads but the > >> current > >> one when running the child process. > > > > Oops, here is an amended version. I forgot to modify types.db. Sorry. > > > > Another amended variant. Things can only improve from this point.
Indeed! It appears that process-fork's type hasn't just changed in the number of arguments but also the types, which we both overlooked. The first argument can be #f now, so you can create a fork of a process with all threads killed, but without running a thunk. The documentation was correctly changed, but here's a fix for types.db. Cheers, Peter -- http://sjamaan.ath.cx -- "The process of preparing programs for a digital computer is especially attractive, not only because it can be economically and scientifically rewarding, but also because it can be an aesthetic experience much like composing poetry or music." -- Donald Knuth
>From cec152e4c4be2efeef82262cc3f467f2b97e78ed Mon Sep 17 00:00:00 2001 From: Peter Bex <[email protected]> Date: Sat, 3 Nov 2012 16:43:10 +0100 Subject: [PATCH] Process-fork's type has changed in 47b5be71; the procedure can be #f now too. Update types.db to match --- types.db | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types.db b/types.db index 2e6e45d..da45786 100644 --- a/types.db +++ b/types.db @@ -1726,7 +1726,7 @@ (process-execute (#(procedure #:clean #:enforce) process-execute (string #!optional (list-of string) (list-of string)) noreturn)) -(process-fork (#(procedure #:enforce) process-fork (#!optional (procedure () . *) *) fixnum)) +(process-fork (#(procedure #:enforce) process-fork (#!optional (or (procedure () . *) boolean) *) fixnum)) (process-group-id (#(procedure #:clean #:enforce) process-group-id () fixnum)) (process-run (#(procedure #:clean #:enforce) process-run (string #!optional (list-of string)) fixnum)) -- 1.7.12.2
_______________________________________________ Chicken-hackers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-hackers
