Skip to content

Commit

Permalink
Fix eventloop pause (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth authored Jan 17, 2022
1 parent 4e85df6 commit ac70d64
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ProfileView.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ macro profview(ex)
Gtk.pause_eventloop() do
Profile.clear()
@profile $(esc(ex))
view()
end
view()
end
end

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ac70d64

Please sign in to comment.