Login  Register

Re: thread safe session handling via TSS

Posted by Riccardo Ghetta on Oct 23, 2012; 1:43pm
URL: http://quantlib.414.s1.nabble.com/thread-safe-session-handling-via-TSS-tp13618p13620.html

Not directly, no.
I've looked at mortoray patch. Unfortunately that scheme is not
compatible with thread storage;  having a per-thread instance makes all
the sessionId/sessionIdFunc machinery useless.  In a way, is implicitly
handled.  Likewise for the instances_ map.

On the other hand, perhaps I can rework the tss patch to avoid including
boost thread headers in singleton.hpp, if we don't want to force
quantlib users to compile with boost:thread.
That should preserve the main qualities of the above patch, i.e. being
thread-safe and not requiring libboost_thread, plus the added safety,
simplicity and performance of tss.

it might be a reasonable solution ?
Ciao,
R


-------- Original Message --------
Subject: Re: [Quantlib-dev] thread safe session handling via TSS
From: Luigi Ballabio <[hidden email]>
To: Riccardo Ghetta <[hidden email]>
CC: [hidden email], Ferdinando Ametrano
<[hidden email]>
Date: Tuesday, October 23, 2012 12:10:59

> Riccardo,
>     I just had a look at your patch.  Is there any chance that it can
> be made to work together with the pending patch at
> <https://github.com/mortoray/quantlib/commit/dbf6b23429b21cccb0982d6f3e5c13f5860842e1>?
>   (Yes, we have stuff all over the place and it's not easy to find it.
> Our bad.)
>
> About the contributor agreement: in the past we used something like
> the document I'm attaching.  You can scan the signed document and send
> it to me and Ferdinando (whose address is in cc).
>
> Thanks,
>      Luigi
>
>
> On Fri, Oct 19, 2012 at 3:22 PM, Riccardo Ghetta <[hidden email]> wrote:
>> Hi,
>> I've just posted a patch to enable thread safe session handling.  It
>> should also solve bug 3441748.
>> The company I work for, Thema Consulting SA (www.themaconsulting.ch),
>> uses QuantLib in its MasterFinance product and has other patches we like
>> to contribute back (as soon they're cleared by management/legal).
>>
>> BTW, is the contributor agreement needed ? Where should be sent ?
>> I searched the mailing list, but without luck.
>>
>> Ciao,
>> Riccardo Ghetta
>> Thema Consulting SA
>>
>> ------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_sfd2d_oct
>> _______________________________________________
>> QuantLib-dev mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev