Skip to content

Commit dca2394

Browse files
rasmushenningssonbarche
authored andcommitted
Fix exec_async on Julia 1.11
`exec_async` uses the private Base function `run_main_repl`, but in Julia 1.11, the arguments changed, which casued `exec_async` to fail silently. This fixes the issue by checking the Julia version and using the appropriate arguments. Also removed unused global `_async_timer` (it was used for an earlier implementation of `exec_async`, but isn't used anymore).
1 parent 79ed285 commit dca2394

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/QML.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -623,10 +623,13 @@ end
623623

624624
include("itemmodel.jl")
625625

626-
global _async_timer
627-
628626
function exec_async()
629-
newrepl = @async Base.run_main_repl(true,true,true,true,true)
627+
if VERSION >= v"1.11-"
628+
newrepl = @async Base.run_main_repl(true,true,:yes,true,true)
629+
else
630+
newrepl = @async Base.run_main_repl(true,true,true,true,true)
631+
end
632+
630633
while !istaskdone(newrepl)
631634
for (updater, x) in _queued_properties
632635
updater.propertymap[updater.key] = x

0 commit comments

Comments
 (0)