Maintenance at Wednesday, 30. June 2021, from 8:15 to 9:15
Some of the planned changes may require user action

Commit 7fcb7c5b authored by Mohcine Chraibi's avatar Mohcine Chraibi
Browse files

Add flag to SrcManager to mark building update

Source thread updates the Queues, but the building is not updated yet.
That leads, to the same agents will be generated by the sources
and added to the Queue.
The queue will be emptied in the main thread.

Therefore, the source thread should not iterate again, unless the
main thread empties the queues and updated the building pointer
parent 686eac90
This diff is collapsed.
......@@ -91,6 +91,14 @@ public:
bool IsCompleted() const;
* @return true if the building is updated
bool IsBuildingUpdated() const;
void SetBuildingUpdated(bool update);
* Return a pointer to the building object
......@@ -170,6 +178,8 @@ private:
/// whether all agents have been dispatched
static bool _isCompleted;
// std::atomic<bool>_buildingUpdated=false;
bool _buildingUpdated;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment