瀏覽代碼

julia: Fix examples.

Pierre Huchant 5 年之前
父節點
當前提交
0f3603817c
共有 2 個文件被更改,包括 9 次插入3 次删除
  1. 5 3
      julia/examples/callback/callback.jl
  2. 4 0
      julia/examples/dependency/sequential_consistency.jl

+ 5 - 3
julia/examples/callback/callback.jl

@@ -22,8 +22,6 @@ using StarPU
     return
 end
 
-starpu_init()
-
 function callback(args)
     cl = args[1]
     handles = args[2]
@@ -69,6 +67,10 @@ function display()
     end
 end
 
+# Disable garbage collector because of random segfault/hang when using mutex.
+# This issue should be solved with Julia release 1.5.
+GC.enable(false)
+starpu_init()
 display()
-
 starpu_shutdown()
+GC.enable(true)

+ 4 - 0
julia/examples/dependency/sequential_consistency.jl

@@ -113,6 +113,10 @@ function main()
     println("Value = ", value[])
 end
 
+# Disable garbage collector because of random segfault/hang when using mutex.
+# This issue should be solved with Julia release 1.5.
+GC.enable(false)
 starpu_init()
 main()
 starpu_shutdown()
+GC.enable(true)