Comments (9)
Yeah, we're just going to remove the functions :) They're only duplicating the behaviour of the functions with the same names from glib.
from gtk3-rs.
I also just ran into this.
Not only is this function safe to call from other threads, it is the recommended way of communicating back to the main thread from another thread.
I'd be happy to come up with a patch, but I'm not sure how that works with the generated bindings?
from gtk3-rs.
@cmyr: So issue need be renamed to "threads_add_idle asserts if is running not on the main thread" ?
from gtk3-rs.
It need fix in gir, I will do it on the weekend
from gtk3-rs.
@cmyr You can use glib::source::idle_add()
, or for a slightly different pattern glib::MainContext::channel()
or any approach using futures (the main context is a futures executor).
I think we should simply ignore this and similar functions from gdk. They don't bring any additional advantage.
from gtk3-rs.
I think we should simply ignore this and similar functions from gdk. They don't bring any additional advantage.
I.e. all gdk_threads_.*
functions should be ignored.
from gtk3-rs.
@EPashkin You make a PR for that?
from gtk3-rs.
idle_add()
looks like it would probably work. I don't have enough context to offer a strong opinion; I don't use gtk much, I'm just maintaining some code.
In terms of naming of this thread title, well lets not spend too much time on it 😉 but I think the current phrasing is reasonable; there is an assert that checks if the function is running on the main thread, which fails otherwise, even though it should be okay to call this function on other threads.
from gtk3-rs.
The functions were removed.
from gtk3-rs.
Related Issues (20)
- Unexpected plug-added event for socket realized HOT 2
- could not find system library 'gio-2.0' required by the 'gio-sys' crate HOT 6
- [BUG] Wrong return turn (u32 vs gint) for GtkNotebook append_page HOT 3
- Update to wayland-client 0.30
- [HELP] Using GTK_STOCK_REMOVE HOT 2
- the procedure entry point _divmoddi4 could not be located in the dynamic link library D:\msys32\mingw32\bin\libglib-2.0-0.dll HOT 1
- [HELP] STATUS_ACCESS_VIOLATION when right clicking an Entry widget HOT 3
- [BUG] gtk fails to compile on mispel HOT 1
- [HELP] What is best way to show error message and then close application on panic?
- Quoting C documentation regarding the use of Rust methods is not helpful HOT 2
- [BUG] Dialog and clipboard examples are dead links
- Gtk::Inhibit has been removed in very recent versions. Documentation says it's still there. HOT 5
- [HELP] How do I get the width and height of the current screen? HOT 3
- [BUG] window.rs has two fn "screen" HOT 2
- [HELP] Clipboard: missing connect_owner_change function?
- [HELP] Make a desktop widget using GTK3 bindings
- [HELP] Why doesn't the merge PRs? HOT 1
- [HELP] Access gtk_sys::GtkWidget from gtk::GtkToggleButton HOT 2
- [BUG] Unexpected lines in `cairo_threads` example running on HiDPI display
- [BUG] The examples don't compile due compilation error on atk v0.19.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gtk3-rs.