[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: thread safe

From: Bert Huijben <bert_at_vmoo.com>
Date: Tue, 4 Sep 2012 11:02:13 -0700

That function performs a shallow copy. It doesn't know how to duplicate
the referenced values or keys. (And the config is inside something like
a multilevel hash)

Bert Huijben (Cell phone)
From: Stefan Küng
Sent: 4-9-2012 19:33
To: dev_at_subversion.apache.org
Subject: Re: thread safe
On 03.09.2012 22:21, Branko ÄŒibej wrote:
> On 03.09.2012 22:16, Stefan Küng wrote:
>> On 03.09.2012 22:11, Branko ÄŒibej wrote:
>>> Either that, or add a new API that creates a deep-copy of the in-memory
>>> svn_config_t structure, making this another way to avoid re-reading the
>>> config file for each thread and avoiding the hassle of managing a mutex.
>>
>> I'm in favor of implementing a deep copy API for this. I think that
>> would be the best solution.
>
> I find it to be the best option, too. Will you write a patch for that?

Ahem:
apr_hash_copy
will do the trick: svn_config_t is a typedef for an apr_hash_t.

So it's already done :)

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
Received on 2012-09-04 20:02:47 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.