Hello, Andy Wingo <wi...@pobox.com> writes:
> Good question. I suppose you have this case in mind: > > (define s0 (string "foooooo")) > (define s1 (substring/shared s0 0)) > (define s2 (substring/shared s1 0)) > (par-for-each (lambda (s) (string-set! s 0 #\b)) > (list s0 s1 s2)) Yes. OTOH, the doc doesn't say that concurrent array accesses are safe, so array accesses are supposed to be synchronized at the application level, using mutexes, I suppose. > I suppose that's a case in which scm_array_handle_elements and > scm_array_handle_writable_elements should do different things. But once > you have the array handle, it doesn't seem that it needs to be released. > (The validity of the pointer should be assured by the reference that > each string has to its stringbuf.) Yes. Still, I don't feel like we have any compelling reason to remove `scm_array_handle_release ()'. One argument to keep it is that it's the kind of thing that's much easier to remove than to reinstate, and "we never know". Also, removing it would cause gratuitous incompatibility. Thanks, Ludo'.