This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is anyone doing <chrono> ?


On Sun, Aug 31, 2008 at 3:46 PM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> Pedro Lamarão wrote:
>>
>> I'm thinking on trying an implementation of <chrono>, in order to update
>> my own implementation of <thread> and friends.
>>
>> Is anyone working on this?
>>
>
> ... well, just have a look to past messages to this mailing list... Anyway,
> Chris Fairles contributed it already and he is also working on <thread>,
> well underway, I gather... Therefore, if you have ideas for improvements,
> more than welcome, but otherwise the precedence for the general design goes
> to Chris, at this point. I would suggest keeping in touch with Chris,
> privately too.
>
> Paolo.
>

Hi Pedro,

As Paolo mentioned, my <chrono> implementation has been accepted into
mainline (and <ratio> on which it depends before that). As for
<thread> and friends I've attached an incomplete patch of the
implementation bits only. I left out the configury bits because
they're in flux right now (i.e. _GLIBCXX_USE_NANOSLEEP is getting
replaced).

As for <thread> itself, I tried to start out with a basic
implementation following boost::thread (from 1.36). There needs to be
some work done on keeping track of the thread data. Today I was
thinking about how TLS might help (i.e. thread_local, or __thread gcc
extension until thread_local gets implemented) but I'm not sure it
provides any benefit.

I'm just brushing up the test cases for <mutex> and
<condition_variable> at the moment so should be submitting those
within a day or two I hope. As for <thread>, I'm certainly open to
implementation suggestions since mine is minimal.

Chris

Attachment: thread_et_al.patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]