Bug 58039 - [PATCH] Make D* functions thread safe
Summary: [PATCH] Make D* functions thread safe
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: 3.13-dev
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Keywords: PatchAvailable
Depends on:
Reported: 2015-06-16 10:28 UTC by Patrick Böker
Modified: 2015-09-03 15:58 UTC (History)
0 users

dstar_threading.patch (5.56 KB, patch)
2015-06-16 10:28 UTC, Patrick Böker
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Böker 2015-06-16 10:28:30 UTC
Created attachment 32825 [details]

The DGet/DMin implementations relied on class variables. They thus unpredictably returned wrong values when using them in a multithreaded environment.
This patch fixes this.

The code is tested, but whether the multithreading issues I encountered are actually gone will only show in a week or two. It's a rather simple patch, so I'm quite confident anyways.
Comment 1 Patrick Böker 2015-06-18 15:15:36 UTC
Just noticed that this bug also affects non-threaded but nested uses of a D* function. This patch fixes these cases also.
Comment 2 Patrick Böker 2015-09-03 14:09:54 UTC
This patch has proven reliable in our production system over the past two months. Is there any reason for not merging?
Comment 3 David North 2015-09-03 15:58:08 UTC
Looks good to me. Merged with some minor tweaks in svn r1701055

Should be in the next beta release.