From ac70d6463e86ec0d4a0d345000dcef4b0ee0ba70 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Mon, 17 Jan 2022 15:16:14 -0500 Subject: [PATCH] Fix eventloop pause (#192) --- src/ProfileView.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ProfileView.jl b/src/ProfileView.jl index e6e436c..c0adcfb 100644 --- a/src/ProfileView.jl +++ b/src/ProfileView.jl @@ -68,8 +68,8 @@ macro profview(ex) Gtk.pause_eventloop() do Profile.clear() @profile $(esc(ex)) - view() end + view() end end @@ -145,10 +145,10 @@ function view(data::Vector{UInt64}; lidict=nothing, kwargs...) end function view(; kwargs...) # pausing the event loop here to facilitate a fast retrieve - Gtk.pause_eventloop() do - data, lidict = Profile.retrieve() - view(FlameGraphs.default_colors, data; lidict=lidict, kwargs...) + data, lidict = Gtk.pause_eventloop() do + Profile.retrieve() end + view(FlameGraphs.default_colors, data; lidict=lidict, kwargs...) end # This method allows user to open a *.jlprof file