Commit e833ca4
committed
threadpool: improve abort handling
Do not use threadpool->ec (exit code) to decide whether to exit the compute loop.
threadpool->ec is not atomic which makes thread-sanitizer rightfully unhappy about it.
We already have an atomic threadpool->stop flag for this which is consitent with the
rest of the code.
While at it add an explicit atomic_load for n_threads_cur for consistency.1 parent b9763b3 commit e833ca4
1 file changed
+11
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19928 | 19928 | | |
19929 | 19929 | | |
19930 | 19930 | | |
| 19931 | + | |
19931 | 19932 | | |
19932 | | - | |
19933 | | - | |
| 19933 | + | |
| 19934 | + | |
19934 | 19935 | | |
19935 | 19936 | | |
19936 | 19937 | | |
19937 | 19938 | | |
19938 | 19939 | | |
19939 | | - | |
| 19940 | + | |
19940 | 19941 | | |
19941 | 19942 | | |
19942 | | - | |
| 19943 | + | |
19943 | 19944 | | |
19944 | 19945 | | |
19945 | | - | |
| 19946 | + | |
19946 | 19947 | | |
19947 | 19948 | | |
19948 | 19949 | | |
19949 | 19950 | | |
19950 | | - | |
19951 | | - | |
| 19951 | + | |
| 19952 | + | |
| 19953 | + | |
| 19954 | + | |
19952 | 19955 | | |
19953 | 19956 | | |
19954 | 19957 | | |
19955 | | - | |
19956 | | - | |
19957 | | - | |
19958 | | - | |
19959 | 19958 | | |
19960 | 19959 | | |
19961 | 19960 | | |
| |||
20220 | 20219 | | |
20221 | 20220 | | |
20222 | 20221 | | |
| 20222 | + | |
20223 | 20223 | | |
20224 | 20224 | | |
20225 | 20225 | | |
| |||
0 commit comments