Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Remove callback guard #667

Merged
merged 3 commits into from
Jun 23, 2018
Merged

Conversation

EPashkin
Copy link
Member

@@ -10,8 +10,7 @@ while (/^(\N*)\V*fn\s+(\w+)\s*(<[^(]+>)?\s*(\([^{;]+)\{\N*\n^(\N*)$/gms) {
$first_line =~ /^\s*(
assert_initialized_main_thread |
assert_not_initialized |
skip_assert_initialized |
callback_guard
skip_assert_initialized
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsafe functions just not checked, so this line not worked anyway

let _guard = ::glib::CallbackGuard::new();
if cfg!(debug_assertions) {
assert_initialized_main_thread!();
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I slightly worry about this check, maybe it really needed

@sdroege
Copy link
Member

sdroege commented Jun 23, 2018

Yes but it should not be in the callback guard macro. I thought there was another macro for that?

@EPashkin
Copy link
Member Author

This macro named assert_initialized_main_thread ;)
I just not sure that we need check that all callback called from main thread in gtk.

@sdroege
Copy link
Member

sdroege commented Jun 23, 2018

They are and it makes no sense to check that in the callback. It would be a gtk bug and not ours, not something we should try to detect

@EPashkin
Copy link
Member Author

Ok, then I think that PR is ready

@GuillaumeGomez
Copy link
Member

I just hope gtk doesn't have another bug. :-/

Thanks @EPashkin and @sdroege!

@GuillaumeGomez GuillaumeGomez merged commit e599669 into gtk-rs:master Jun 23, 2018
@EPashkin EPashkin deleted the remove_callback_guard branch June 23, 2018 13:46
vhdirk pushed a commit to vhdirk/gtk-rs that referenced this pull request Jan 16, 2019
@EPashkin EPashkin mentioned this pull request Jan 19, 2019
alex179ohm pushed a commit to alex179ohm/gtk that referenced this pull request Oct 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants