File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1970,6 +1970,8 @@ jl_code_instance_t *jl_method_compiled(jl_method_instance_t *mi, size_t world)
1970
1970
return NULL ;
1971
1971
}
1972
1972
1973
+ jl_mutex_t precomp_statement_out_lock ;
1974
+
1973
1975
static void record_precompile_statement (jl_method_instance_t * mi )
1974
1976
{
1975
1977
static ios_t f_precompile ;
@@ -1980,6 +1982,8 @@ static void record_precompile_statement(jl_method_instance_t *mi)
1980
1982
if (!jl_is_method (def ))
1981
1983
return ;
1982
1984
1985
+ if (jl_n_threads > 1 )
1986
+ JL_LOCK (& precomp_statement_out_lock );
1983
1987
if (s_precompile == NULL ) {
1984
1988
const char * t = jl_options .trace_compile ;
1985
1989
if (!strncmp (t , "stderr" , 6 )) {
@@ -1998,6 +2002,8 @@ static void record_precompile_statement(jl_method_instance_t *mi)
1998
2002
if (s_precompile != JL_STDERR )
1999
2003
ios_flush (& f_precompile );
2000
2004
}
2005
+ if (jl_n_threads > 1 )
2006
+ JL_UNLOCK (& precomp_statement_out_lock );
2001
2007
}
2002
2008
2003
2009
jl_code_instance_t * jl_compile_method_internal (jl_method_instance_t * mi , size_t world )
You can’t perform that action at this time.
0 commit comments