Inheritable thread locals Shiro Kawai (20 Oct 2022 23:38 UTC)
Re: Inheritable thread locals Marc Nieper-Wißkirchen (21 Oct 2022 05:43 UTC)
Re: Inheritable thread locals Shiro Kawai (21 Oct 2022 11:10 UTC)
Re: Inheritable thread locals Marc Nieper-Wißkirchen (22 Oct 2022 12:05 UTC)
Re: Inheritable thread locals Marc Nieper-Wißkirchen (05 Nov 2022 18:56 UTC)
Re: Inheritable thread locals Shiro Kawai (05 Nov 2022 20:10 UTC)

Re: Inheritable thread locals Marc Nieper-Wißkirchen 21 Oct 2022 05:42 UTC

Thanks for coming up with this. I thought about this feature when I
wrote up the spec. It is also a feature of Racket's thread cells. I
left it out because I hadn't pondered how to implement this feature
efficiently and directly with the POSIX and C11 threading libraries.

If you have a good idea about it, I am very open to including the
feature you propose.

Am Fr., 21. Okt. 2022 um 01:38 Uhr schrieb Shiro Kawai <xxxxxx@gmail.com>:
>
> In the current spec, a new thread's thread local is initialized by the obj argument given to make-thread-local.  There may be cases that the child thread wants to see the same value as the parent thread at the moment make-thread is called.
>
> Java has InheritableThreadLocal that does it:
> https://docs.oracle.com/javase/7/docs/api/java/lang/InheritableThreadLocal.html
>
> There seems a proposal for C++ as well:
> https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2633r0.html
>