librelist archives

« back to archive

Threadsafe configuration option?

Threadsafe configuration option?

From:
Charlie Sharpsteen
Date:
2011-06-19 @ 22:39
Hello,

I'm updating the Homebrew formula for libgit2 and moving it to CMake
now that Waf support has been depreciated. I noticed that the default
setting for CMake is to build libgit2 with THREADSAFE=OFF.  Is there
any reason for this? Performance tradeoffs?

I could not find any comments or blame log entries that would help me
figure out why THREADSAFE=OFF is the default configuration.

-Charlie

Re: [libgit2] Threadsafe configuration option?

From:
Andrius Bentkus
Date:
2011-06-19 @ 23:19
No more waf? Wasn't that bad -.-

Re: [libgit2] Threadsafe configuration option?

From:
Vicent Marti
Date:
2011-06-20 @ 00:16
On Mon, Jun 20, 2011 at 1:19 AM, Andrius Bentkus
<andrius.bentkus@gmail.com> wrote:
> No more waf? Wasn't that bad -.-

No, but keeping CMake in sync was a massive pain in the ass. At the
end of the day, we needed CMake because of the native IDE projects it
generates, so we've decided to stick with it.

Hopefully it's not too inconvenient.

Cheers,
Vicent

Re: [libgit2] Threadsafe configuration option?

From:
Andrius Bentkus
Date:
2011-06-20 @ 01:10
>
> No, but keeping CMake in sync was a massive pain in the ass. At the
> end of the day, we needed CMake because of the native IDE projects it
> generates, so we've decided to stick with it.
>
> Hopefully it's not too inconvenient.
>

Didn't take me 60 seconds to read up README in order to determine how to
build that. So it is not! :)

Re: [libgit2] Threadsafe configuration option?

From:
Vicent Marti
Date:
2011-06-20 @ 00:15
Hey,

On Mon, Jun 20, 2011 at 12:39 AM, Charlie Sharpsteen
<chuck@sharpsteen.net> wrote:
> Hello,
>
> I'm updating the Homebrew formula for libgit2 and moving it to CMake
> now that Waf support has been depreciated. I noticed that the default
> setting for CMake is to build libgit2 with THREADSAFE=OFF.  Is there
> any reason for this? Performance tradeoffs?

we disable all threading on Windows because TLS is a pain in the butt
there. I'm on the process of updating most of the threading code,
specially under Windows, because some of it is rather experimental.

My advice would be to keep threading disabled on the Homebrew formula,
although I've personally tested the library under Mac OS X with
threading and found no issues.

Either way, thanks for taking the time to update it.

Cheers,
Vicent