@@ -11,6 +11,8 @@ if VERSION ≥ v"1.11"
1111 REPL. repl_display_error (errio:: IO , @nospecialize errval) = repl_display_error_abbrv (errio, errval)
1212end
1313
14+
15+
1416if VERSION ≥ v " 1.12-alpha"
1517 function REPL. print_response (errio:: IO , response, backend:: Union{REPL.REPLBackendRef,Nothing} , show_value:: Bool , have_color:: Bool , specialdisplay:: Union{AbstractDisplay,Nothing} = nothing )
1618 Base. sigatomic_begin ()
@@ -26,9 +28,7 @@ if VERSION ≥ v"1.12-alpha"
2628 if val != = nothing && show_value
2729 val2, iserr = if specialdisplay === nothing
2830 # display calls may require being run on the main thread
29- REPL. call_on_backend (backend) do
30- Base. invokelatest (display, val)
31- end
31+ Base. invokelatest (display, val), false
3232 else
3333 REPL. call_on_backend (backend) do
3434 Base. invokelatest (display, specialdisplay, val)
@@ -65,6 +65,11 @@ if VERSION ≥ v"1.12-alpha"
6565 Base. sigatomic_end ()
6666 nothing
6767 end
68+ function REPL. call_on_backend (f, backend:: REPL.REPLBackendRef )
69+ applicable (f) || error (" internal error: f is not callable" )
70+ put! (backend. repl_channel, (f, 2 )) # (f, show_value) 2 indicates function (rather than ast)
71+ return take! (backend. response_channel) # (val, iserr)
72+ end
6873else
6974 function REPL. print_response (errio:: IO , response, show_value:: Bool , have_color:: Bool , specialdisplay:: Union{AbstractDisplay,Nothing} = nothing )
7075 Base. sigatomic_begin ()
0 commit comments