[Top][All Lists]

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

Re: (n-for-each-par-map 16 store download (reverse (iota (max-id))))) cr

From: Mark H Weaver
Subject: Re: (n-for-each-par-map 16 store download (reverse (iota (max-id))))) crash
Date: Fri, 06 Jul 2018 03:01:21 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)


Amirouche Boubekki <address@hidden> writes:

> On 2018-07-05 20:30, Mark H Weaver wrote:
>> Amirouche Boubekki <address@hidden> writes:
>>> (define (store pair)
>>>   (if (null? pair)
>>>       (format #t "X\n")
>>>       (let ((port (open-file "hn.scm" "a")))
>>>         (format #t "~a\n" (car pair))
>> These calls to (format #t ...), which write to a port that is shared by
>> multiple threads, should be performed while holding a mutex to prevent
>> concurrent writes to the same port.
> Ok, but it's called by:
>   (n-for-each-par-map n sproc pproc lst1 lst2)
> and the manual says about SPROC that :
>   The sproc calls are made serially,
>   in list element order, one at a time.
> In my case SPROC is 'store', so my understanding is that
> it should require no lock.

You're right, my mistake.  I'm not sure what's going on here.  It would
be good to send a message to address@hidden to file a bug report, and
to continue the discussion there.


reply via email to

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