Commit fd7c78b
committed
COMP: Let
`Future` was declared as `std::future<ITK_THREAD_RETURN_TYPE>`, which is
platform specific, and caused warnings on some platforms, as reported by Hans
Johnson at InsightSoftwareConsortium#5945 :
itkPoolMultiThreader.cxx:148:55: warning:
ignoring return value of function declared with 'nodiscard'
attribute [-Wunused-result]
exceptionHandler.TryAndCatch([this, threadLoop] { m_ThreadInfoArray[threadLoop].Future.get(); });
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Addressed by replacing the public `ThreadPoolInfoStruct` with a private
`InternalWorkUnitInfo` struct, which has its `Future` declared as
`std::future<void>`.Future.get() calls in PoolMultiThreader always return void1 parent badec43 commit fd7c78b
File tree
2 files changed
+15
-10
lines changed- Modules/Core/Common
- include
- src
2 files changed
+15
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
| 105 | + | |
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
| |||
107 | 111 | | |
108 | 112 | | |
109 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
110 | 119 | | |
111 | 120 | | |
112 | 121 | | |
113 | 122 | | |
114 | 123 | | |
115 | 124 | | |
116 | | - | |
| 125 | + | |
117 | 126 | | |
118 | 127 | | |
119 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
| 136 | + | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| |||
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
178 | | - | |
179 | | - | |
180 | 179 | | |
181 | 180 | | |
182 | 181 | | |
| |||
265 | 264 | | |
266 | 265 | | |
267 | 266 | | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
| 267 | + | |
| 268 | + | |
273 | 269 | | |
274 | 270 | | |
275 | 271 | | |
| |||
0 commit comments