January 31, 2009
On 2009-01-29 23:19:25 +0100, Walter Bright <newshound1@digitalmars.com> said:

> Sean Kelly wrote:
>> There are pthread calls for TLS which are implemented for OSX.  But however it works (I haven't looked into it), it likely isn't as efficient or easy to deal with as the __thread storage class on other OSes.
> 
> It won't be as efficient. But that really doesn't matter at this point - accessing global variables in a tight loop is a bad idea anyway. TLS just has to work. It can be optimized later as OSX improves (which it must, as TLS is going to be a bigger and bigger deal as time goes on).

I don't agree so much with this, TLS can be useful is some occasions but should be used very sparingly in my opinion, it should be used mostly for the infrastructure, not by the end user.

TSL is an evolution of global variables and still has many of their drawbacks, if possible one should pass the variables explicitly, often with some care, and maybe grouping them into structure it turns out to be easier than one thinks, and the effort costs little typing.

There are things where TSL can be very useful, and I use it for example to make the scheduling interface nicer, but I think that with good design those cases are few...

Encouraging wide use of TSL is bad in my opinion (not that you are doing it, but one might interpret it like that).

Fawzi

January 31, 2009
Fawzi Mohamed wrote:
> Encouraging wide use of TSL is bad in my opinion (not that you are doing it, but one might interpret it like that).

If decent support for TLS is not there, then programmers will use regular global data instead, which comes with a whole raft of threading problems.
February 04, 2009
BCS wrote:
> 
> http://dobbscodetalk.com/index.php?option=com_content&task=view&id=1015&Itemid= 

Very exciting! Thanks, Walter!

Do you know whether OSX releases will be produced for D1, or just D2?

I've had my fingers crossed that you were working on this, and I'm very happy to see that the progress is so swift :o)

--benji
February 04, 2009
Benji Smith wrote:
> Do you know whether OSX releases will be produced for D1, or just D2?

Both.
February 05, 2009
Walter Bright wrote:
> Benji Smith wrote:
>> Do you know whether OSX releases will be produced for D1, or just D2?
> 
> Both.

Sweet. You da man.

--b
1 2
Next ›   Last »