|
From: Peter C. <pca...@gm...> - 2014-07-27 15:52:25
|
I briefly thought of declaring the block in LazyObject::calculate() critical. Is that what you mean ? I did not try, but I would expect that _all_ calculations on lazy object instances would then go in single file ? Maybe one could create a lock based on the this ptr and build a suitable synchronization on that though ? Peter On 22 July 2014 13:55, mkuklik <mk...@gm...> wrote: > Hey there, > > Have you considered using CRITICAL directive in OpenMP? Basically, it > specifies a region of code that must be executed by only one thread at a > time. > > Cheers, > > mk > > > > -- > View this message in context: http://quantlib.10058.n7.nabble.com/Multithreading-and-LazyObject-tp15310p15631.html > Sent from the quantlib-dev mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev |