|
From: Luigi B. <lui...@gm...> - 2012-11-26 15:21:21
|
It might be reasonable. But as mortoray argued, one might want to switch between the two possibilities without recompiling; especially those that don't compile the library and get it packaged from a Linux distribution. If we provide such a switch, linking libboost_thread would be required anyway. What do you think? A future possibility would be to rework mortoray's patch so that the pluggable function returns the instance directly instead of an integer id; in such an implementation, your technique would just provide a particular function. However, that's not backward compatible... Luigi On Tue, Oct 23, 2012 at 3:43 PM, Riccardo Ghetta <rg...@la...> wrote: > 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 <lui...@gm...> > To: Riccardo Ghetta <rg...@la...> > CC: qua...@li..., Ferdinando Ametrano > <na...@am...> > 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 <rg...@la...> 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 >>> Qua...@li... >>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev > > |