Skip to content
Snippets Groups Projects
Commit cc284833 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Correct destruction of the lock

parent 0ba4c1b1
No related branches found
No related tags found
1 merge request!1001Use the threadpool to parallelize operations in the particle-splitting code
......@@ -373,7 +373,7 @@ void engine_split_gas_particles(struct engine *e) {
lock_init(&data_split.lock);
threadpool_map(&e->threadpool, engine_split_gas_particle_split_mapper,
s->parts, nr_parts_old, sizeof(struct part), 0, &data_split);
lock_destroy(&data_split.lock);
if (lock_destroy(&data_split.lock) != 0) error("Error destroying lock");
/* Update the local counters */
s->nr_parts = k_parts;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment