File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ Some rules if you are writing multithreaded code:
9
9
- You probably also need to call ` PythonCall.GC.disable() ` on the main thread before any
10
10
threaded block of code. Remember to call ` PythonCall.GC.enable() ` again afterwards.
11
11
(This is because Julia finalizers can be called from any thread.)
12
+ - Julia intentionally causes segmentation faults as part of the GC safepoint mechanism.
13
+ If unhandled, these segfaults will result in termination of the process. To enable signal handling,
14
+ set ` PYTHON_JULIACALL_HANDLE_SIGNALS=yes ` before any calls to import juliacall. This is equivalent
15
+ to starting julia with ` julia --handle-signals=yes ` , the default behavior in Julia.
16
+ See discussion [ here] ( https://github.com/cjdoris/PythonCall.jl/issues/219#issuecomment-1605087024 ) for more information.
12
17
- You may still encounter problems.
13
18
14
19
Related issues: [ #201 ] ( https://github.com/cjdoris/PythonCall.jl/issues/201 ) , [ #202 ] ( https://github.com/cjdoris/PythonCall.jl/issues/202 )
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ def args_from_config():
129
129
CONFIG ['opt_sysimage' ] = sysimg = path_option ('sysimage' , check_exists = True )[0 ]
130
130
CONFIG ['opt_threads' ] = int_option ('threads' , accept_auto = True )[0 ]
131
131
CONFIG ['opt_warn_overwrite' ] = choice ('warn_overwrite' , ['yes' , 'no' ])[0 ]
132
- CONFIG ['opt_handle_signals' ] = ' no'
132
+ CONFIG ['opt_handle_signals' ] = choice ( 'handle_signals' , [ 'yes' , ' no'], default = 'no' )[ 0 ]
133
133
134
134
# Stop if we already initialised
135
135
if CONFIG ['inited' ]:
You can’t perform that action at this time.
0 commit comments