Re: Inheritable thread locals
Marc Nieper-WiÃkirchen 05 Nov 2022 18:56 UTC
Now specified in implemented in the most recent version in my personal repo:
https://htmlpreview.github.io/?https://github.com/mnieper/srfi-226/blob/master/srfi-226.html
Am Sa., 22. Okt. 2022 um 14:04 Uhr schrieb Marc Nieper-Wißkirchen
<xxxxxx@gmail.com>:
>
> Am Fr., 21. Okt. 2022 um 13:10 Uhr schrieb Shiro Kawai <xxxxxx@gmail.com>:
> >
> > Ah, Gauche uses its own array of thread local cells so it's possible to copy it when a new thread is created, but if you directly implement each thread local with the underlying system's one, it may not be easy to keep track of them.
> >
> > I think inheritable thread locals are less used than non-inheritable ones and we can put them off to a later srfi as the demand arises. I wonder if mentioning the possibility of such future enhancement is worth giving hints to the implementers to make design choices.
>
> I agree; we should not block the way to a later addition of
> inheritable thread locals. Of course, it may be more manageable if we
> can already incorporate them into this SRFI.
>
> The obvious way to implement them would be that there is a global,
> weak list of inheritable thread locals. On thread creation, the values
> of these thread locals will be copied.
>
> Marc