File tree Expand file tree Collapse file tree
src/slg/engines/rtpathocl Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ class EditActionList {
6161 friend std::ostream &operator <<(std::ostream &os, const EditActionList &eal);
6262
6363private:
64- u_int actions;
64+ std::atomic< u_int> actions;
6565};
6666
6767inline std::ostream &operator <<(std::ostream &os, const EditActionList &eal) {
Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ class RenderEngine {
210210 RenderStateSPtr startRenderState;
211211 FilmPtr startFilm;
212212
213- bool started, editMode, pauseMode;
213+ std::atomic< bool > started, editMode, pauseMode;
214214
215215 FilterRPtr GetPixelFilter () const { return pixelFilter; }
216216
Original file line number Diff line number Diff line change @@ -126,12 +126,12 @@ class RTPathOCLRenderEngine : public TilePathOCLRenderEngine {
126126
127127 // Used by RTPathOCLRenderEngine code to sync. with render thread 0
128128 std::barrier<completion_t > *syncBarrier;
129- RTPathOCLSyncType syncType;
129+ std::atomic< RTPathOCLSyncType> syncType;
130130
131131 // Used by all render threads to sync.
132132 std::barrier<completion_t > *frameBarrier;
133133
134- double frameTime;
134+ std::atomic< double > frameTime;
135135};
136136
137137}
Original file line number Diff line number Diff line change @@ -298,12 +298,13 @@ void RTPathOCLRenderThread::RenderThreadImpl(std::stop_token stop_token) {
298298
299299 // Check if we are in pause mode
300300 if (engine->pauseMode ) {
301- if (requestedStop)
302- break ;
301+ if (requestedStop)
302+ break ;
303303
304- std::this_thread::sleep_for (100ms);
305- } else
306- break ;
304+ std::this_thread::sleep_for (100ms);
305+ } else {
306+ break ;
307+ }
307308 }
308309
309310 // Re-initialize the tile queue for the next frame
You can’t perform that action at this time.
0 commit comments