subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan K√ľng <>
Subject thread safe
Date Mon, 03 Sep 2012 18:47:59 GMT

It seems that the svn_config_t structure isn't thread safe, i.e. can't 
be shared among multiple threads.
See here for a detailed report on what problems this causes:

Is this by design? I assumed that all svn APIs are thread safe for read 
access at least unless noted otherwise (example: the API 
svn_utf_initialize states its thread-unsafeness in the note section of 
the docs).

While we can work around that thread problem a little bit, that 
workaround has its own big problems:
* each thread would need its own svn_config_t structure
   --> for each thread the config file is read (open, read, close)
   which results in multiple unnecessary disk accesses
   --> when the config file is read multiple times, sometimes the read
   fails (at least on Windows) because the file is opened already -
   usually because virus scanners open and scan every file that a
   process accesses, even when only for reading.

Joel Jirak made a patch for subversion/libsvn_subr/config.c which would 
fix the problem (see the thread linked above). Would that be an 
acceptable solution?


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\

View raw message