提交 964dbdd7 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Using new compilation directory lock to make parallel execution safer

上级 36233c33
差异被折叠。
from compiledir import *
from compilelock import get_lock, release_lock
import sys
......@@ -30,8 +31,14 @@ except ImportError:
cthunk = object()
mod = weave.ext_tools.ext_module('cutils_ext')
fun =weave.ext_tools.ext_function('run_cthunk', single_runner, ['cthunk'])
fun = weave.ext_tools.ext_function('run_cthunk', single_runner, ['cthunk'])
fun.customize.add_extra_compile_arg('--permissive')
mod.add_function(fun)
mod.compile(location = get_compiledir())
get_lock()
try:
mod.compile(location = get_compiledir())
except:
release_lock()
raise
release_lock()
from cutils_ext import *
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论