Skip to content

Commit 8fbdd85

Browse files
committed
Done code review
1 parent 9d4423b commit 8fbdd85

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

reference/async_reference/async_reference.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,10 @@ void async_reference::execute_systems() {
170170

171171
entity_manager.process_entities(async_callbacks, *registry_id);
172172

173+
auto exec_lk = exec_callbacks.lock();
173174
auto systems_error =
174175
ecsact_execute_systems(*registry_id, 1, options.get(), collector);
176+
exec_lk.unlock();
175177

176178
auto end = clock::now();
177179
execution_duration = duration_cast<nanoseconds>(end - start);

reference/async_reference/callbacks/execution_callbacks.hh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ public:
1717

1818
ecsact_execution_events_collector* get_collector();
1919

20+
inline auto lock() -> std::unique_lock<std::mutex> {
21+
return std::unique_lock(execution_m);
22+
}
23+
2024
private:
2125
ecsact_execution_events_collector collector;
2226
std::mutex execution_m;

0 commit comments

Comments
 (0)