--/9DWx/yDrRhgMJTb
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Oct 03, 2012 at 02:46:02AM +0900, KOSAKI Motohiro wrote:
> >>   For example:
> >>
> >>     Thread[:foo] =3D :bar
> >>     Fiber.new(derive_fiber_local_storage: true) do
> >>       Thread[:foo] #=3D> :bar
> >>     end
> >>
> >> And use Fiber in enumerator with this option true.
> >
> > I think the "true thread local" solution is better than this because I
> > can use it with existing fiber based code.  If a third party library
> > uses Fibers, and I want thread locals, it would not be possible with
> > this solution.
>=20
> I'm afraid compatibility breakage. mame-san said:

Maybe I wasn't clear.  I think we should leave Thread#[] behavior as-is.
We can add new methods for accessing thread locals.  This will maintain
backwards compatibility and give us the new functionality.

I attached a patch to this issue to show what I mean. :-)

--=20
Aaron Patterson
http://tenderlovemaking.com/

--/9DWx/yDrRhgMJTb
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (Darwin)

iQEcBAEBAgAGBQJQazchAAoJEJUxcLy0/6/GJD0H/RO0xkcQvxC5xH2aYLpCB7Gz
OdClasQ0let12P2NAFJN5wta9e1u2weHHkmSASyMp7cZBOrIKwjL8cSEPp89lu/a
Z6kC3ooec4FEO++wNmYknGkrBGSghIu5xrmdDvSCE63neTZHhAoW+NFPNTpc/LAa
i//TuP6flsOPHELRnamjifrygHUFKmsl57FLB1E32oZfauRs4E2mj+f/uJ42n67j
E8HBj7nY9laJ0unr2EI22CrQb7+OtEnmoChR+AKULHcrawJ8AAEQB1Xl9axeeCry
t2m0rHY/aqzDc1M4uxo8ayqVDJJE0kkpKTZpaVJz7FhPY4YRqo2fM8jjU/9bmyM=
=sCA+
-----END PGP SIGNATURE-----

--/9DWx/yDrRhgMJTb--

On Wed, Oct 03, 2012 at 02:46:02AM +0900, KOSAKI Motohiro wrote:
> >>   For example:
> >>
> >>     Thread[:foo] =3D :bar
> >>     Fiber.new(derive_fiber_local_storage: true) do
> >>       Thread[:foo] #=3D> :bar
> >>     end
> >>
> >> And use Fiber in enumerator with this option true.
> >
> > I think the "true thread local" solution is better than this because I
> > can use it with existing fiber based code.  If a third party library
> > uses Fibers, and I want thread locals, it would not be possible with
> > this solution.
>=20
> I'm afraid compatibility breakage. mame-san said:

Maybe I wasn't clear.  I think we should leave Thread#[] behavior as-is.
We can add new methods for accessing thread locals.  This will maintain
backwards compatibility and give us the new functionality.

I attached a patch to this issue to show what I mean. :-)

--=20
Aaron Patterson
http://tenderlovemaking.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (Darwin)

iQEcBAEBAgAGBQJQazchAAoJEJUxcLy0/6/GJD0H/RO0xkcQvxC5xH2aYLpCB7Gz
OdClasQ0let12P2NAFJN5wta9e1u2weHHkmSASyMp7cZBOrIKwjL8cSEPp89lu/a
Z6kC3ooec4FEO++wNmYknGkrBGSghIu5xrmdDvSCE63neTZHhAoW+NFPNTpc/LAa
i//TuP6flsOPHELRnamjifrygHUFKmsl57FLB1E32oZfauRs4E2mj+f/uJ42n67j
E8HBj7nY9laJ0unr2EI22CrQb7+OtEnmoChR+AKULHcrawJ8AAEQB1Xl9axeeCry
t2m0rHY/aqzDc1M4uxo8ayqVDJJE0kkpKTZpaVJz7FhPY4YRqo2fM8jjU/9bmyM=
=sCA+
-----END PGP SIGNATURE-----