[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-stdcxx-dev
Subject:    Re: svn commit: r713762 -
From:       Martin Sebor <sebor () roguewave ! com>
Date:       2008-11-18 4:06:25
Message-ID: 20553291.post () talk ! nabble ! com
[Download RAW message or body]



Farid Zaripov-2 wrote:
> 
> > I wonder if it would be worthwhile to give users the ability to
> > decide whether to enable TLS in case they don't need LoadLibrary()
> > or not. What do you think?
> 
> Hmm. I only can say, that nor MSVC run-time, nor STLport nor boost
> libraries are not
> using the implicit TLS.
> 
> Currently the TLS variables are used in 3 places only:
> - exception's what-buffer;
> - table for random number generator;
> - buffer for __rw_tmpbuf().
> 
> 

Right. But there might be other opportunities for TLS (e.g., in locale or
maybe in some of the C++ 0x facilities?)



> 
> We need to check what would be if an exception object is created in one
> thread (i.e. thus "throw new exception();")
> and after catch() the pointer passed to another thread and there deleted?
> 
> 

Ouch! Tricky! I hadn't thought of this when I implemented it. I think we
either need to get this case to work or disable TLS for exceptions, but
we can't have it crash (which, I assume, is what happens in this case?)



> 
> The same issue with __rw_tmpbuf(). What would be if we getting the
> temporary buffer in one thread using
> get_temporary_buffer(), and releasing it, using return_temporary_buffer(),
> in another thread?
> 
> 

That would also be a problem. In this case, though, I think it would
be sufficient to document it as a restriction of the API. IMO, getting
this to work would be more trouble than it's worth.

Martin

-- 
View this message in context: \
http://www.nabble.com/Re%3A-svn-commit%3A-r713762----stdcxx-branches-4.2.x-include-rw-_config.h-tp20518249p20553291.html
 Sent from the stdcxx-dev mailing list archive at Nabble.com.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic