-
Notifications
You must be signed in to change notification settings - Fork 80
simplify sigatom code #212
Conversation
gtk_yielded = false # when true, use the `gtk_doatomic` queue to run sigatom functions | ||
gtk_doatomic = [] # (work, notification) scheduler queue | ||
g_sigatom_flag = false # keep track of Base sigatomic state | ||
function g_sigatom(f::Base.Callable) # calls f, were f never throws (but this function may throw) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
were->where
this doesn't fix 161, it just moves the failure condition so that it should be much less common and avoidable also fixes performance issue with compiling finalizers (esp. at-exit) in v0.4, these were anonymous functions in v0.5, now need to declare the argument type as ::ANY to prevent specializations
This should be better now and make #161 happier |
So, even though this PR doesn't fix #161, it makes it more trivial to work around:
|
I think these might be places that it would try to access the Gtk stac
stk = gtk_stack | ||
g_stack = nothing # need to call g_loop_run from only one stack | ||
const g_yielded = Ref(false) # when true, use the `g_doatomic` queue to run sigatom functions | ||
const g_doatomic = [] # (work, notification) scheduler queue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any virtue in declaring this Tuple{Any,Any}[]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect that would be slower
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine then.
Maybe add a version of those two comments to the README? 💯 |
Awesome. Tag a new release? |
I figured I would give it a day or two for the bug reports to start coming in. But if it seems to be working, then sure, I can tag a new release. |
I haven't tested it yet myself, but that may change by the end of the day. Thanks for tackling this, I'm really looking forward to it. |
I tested whether I could live without JuliaGtk/GtkUtilities.jl#7 by wrapping If you need some test code, I can arrange something. That said, I know you have many priorities, so no rush. |
Test code would be good. There shouldn't be any difference between guarded and siginterruptable now |
@vtjnash: I have tested it during last week and |
this doesn't fix 161, it just moves the failure condition so that it
should be much less common and more avoidable