[lldb-dev] Use of thread local storage in Timer

Zachary Turner zturner at google.com
Mon Sep 8 14:17:05 PDT 2014

On Mon, Sep 8, 2014 at 1:13 PM, Greg Clayton <gclayton at apple.com> wrote:

> >
> > My main concern is that I don't want to expose a generic thread-local
> class that supports TLS destructors if TLS destructors aren't generic
> enough to be available on all platforms.  It makes it too easy to make use
> of them in generic code, breaking other platforms.
> How can you have thread specific data on ANY platform without being able
> to clean it up? Are we expected to only store integers and POD types in the
> TLS data? That would surprise me very much if that is the case.

I can't say Im' familiar with things like libdispatch or many other
posix'isms, but I will say that on Windows, you just wouldn't create
TLS-data on a thread which you don't own the thread routine for.  And
there's also no thread cancellation.  So basically, at least on Windows,
you would just always clean up everything at the end of your thread routine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140908/8ce793a1/attachment.html>

More information about the lldb-dev mailing list