Re: Thread safety

Posted by japari on
URL: http://quantlib.414.s1.nabble.com/Thread-safety-tp8775p8777.html

Sure its not, for instance, have a look at LazyObject::calculate. This one will bite you for sure; LazyObject is quite low in QL's food-chain...everything is Lazy. In this case you might rewrite 'calculate' and lock there (you can lock, call parents 'calculate' and unlock).
But thats ok for one-shot/cached calculations; observability is another story. And... I havent worried about exceptions.... :-(
If you can, prefer distributed as Bojan points out.
Best
Pepe


----- Mail original -----
De: "Bojan Nikolic" <[hidden email]>
À: "Dagur Gunnarsson" <[hidden email]>
Cc: [hidden email]
Envoyé: Lundi 20 Février 2012 16:08:33
Objet: Re: [Quantlib-users] Thread safety


Hi Dagur,

I do not think QuantLib is thread-safe. Parallel implementations using
Quantlib that I am aware of are based on the multi-processes
message-passing model. The structure of instrument portfolios and the
way scenarios are priced means that this is often quite efficient.

Best,
Bojan

--
Bojan Nikolic          ||          http://www.bnikolic.co.uk/ql

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users