|
From: SourceForge.net <no...@so...> - 2012-10-19 12:48:44
|
Patches item #3578375, was opened at 2012-10-19 05:48 Message generated for change (Tracker Item Submitted) made by rglarix You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312740&aid=3578375&group_id=12740 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Riccardo Ghetta (rglarix) Assigned to: Nobody/Anonymous (nobody) Summary: thread-safe session handling using tss Initial Comment: QuantLib default session handling is thread safe only if you allocate all sessions beforehand, otherwise adding/removing a session id changes the map object potentially corrupting other thread iterators. This patch uses boost::thread_specific_ptr to have a per-thread session id. Since the variable used is thread-private and inherently linked to the thread, no sessionId() method is needed. The patch is enabled by defining QL_ENABLE_SESSIONS_TSS in config.hpp Without the define QuantLib uses the old code. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312740&aid=3578375&group_id=12740 |