mortoray/quantlib — comment on commit dbf6b23429b21cccb0982d6f3e5c13f5860842e1
File: ql/patterns/singleton.cpp line 5
By mortoray:

I thought about this, but I really think linking to threads by default
is the best option. Consider that in any distro, standard package, you
will want the threading version turned on, otherwise people will *have*
to compile it on their own.

"shared_ptr" is also already a requirement. Since this has locking and
thread aspects as well, it wouldn't be possible for a user of the
library not to have access to proper threading. That is, any setup which
can use "shared_ptr" can also use boost mutex.

Also not, because of how I setup the header files, users of the library
don't have to link to the threading libraries. Only the quantlib library
has to link to the boost threading library.

On 02/12/2012 03:23 PM, Luigi Ballabio wrote:
> If possible, I'd put the lock-related code in an `#ifdef` block so that it's not used at all when `QL_ENABLE_SESSIONS` is not defined.
> This way, we remove the requirement of linking to libboost_thread if we're not interested in it.
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/mortoray/quantlib/commit/dbf6b23429b21cccb0982d6f3e5c13f5860842e1#commitcomment-957745
>
>

--
edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.