On Jul 27, 2009, at 3:05 PM, Phil Dawes wrote: > Thanks Joe - that sounds like a good idea. > > I also saw this today, which says that osx doesn't have support for > thread local storage at all. Have I understood that right?: > http://dobbscodetalk.com/index.php?option=com_myblog&show=Porting-D-to-the-Mac.html&Itemid=29
I don't think Apple's GCC supports __thread, but thread-local storage is definitely available through pthread_getspecific/ pthread_setspecific on OS X. Since you want to support Unixes and Windows I'd start using boost::thread, which provides a thread_specific_ptr type that will use the native TSS mechanism on all the platforms Factor supports. -Joe ------------------------------------------------------------------------------ _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
