Browse Source

Make sure the task callback is finished before unregistering the data

Samuel Thibault 12 years ago
parent
commit
f6dd5f6060
1 changed files with 3 additions and 1 deletions
  1. 3 1
      tests/errorcheck/invalid_blocking_calls.c

+ 3 - 1
tests/errorcheck/invalid_blocking_calls.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009, 2010  Université de Bordeaux 1
+ * Copyright (C) 2009, 2010, 2013  Université de Bordeaux 1
  * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -100,6 +100,8 @@ int main(int argc, char **argv)
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_data_acquire");
 
 	starpu_data_release(handle);
+
+	starpu_task_wait(task);
 	starpu_data_unregister(handle);
 	starpu_shutdown();