hi,
After spending minutes trying to figure, I thought it’d be doubly good to ask it* here ![]()
// ask it: what’s the meaning of the first sentence in that reference page.
Doubly, cause it may get corrected eventually.
It’s about Gtk.idle_add
https://docs.gtk.org/glib/func.idle_add.html
the sentence is this:
Adds a function to be called whenever there are no higher priority events pending to the default main loop.
It has three parts:
- Adds a function
- to be called whenever there are no higher priority events pending
- to the default main loop.
I know that the sentence is correct ![]()
I am also aware that the Gtk reference is not a tutorial, and must be concise.
But it takes a careful reading, which means it could be more straightforward,
especially because this is the first line in that text.
I think it means this:
(excuse my boldness to interpret it without knowing it in depth)
default main loop
|
|
|_______
| a thread
| |
| |
fn() will | |requesting a call to fn()
be called | |-- here
here --|
or later |
I could imagine improving the sentence like this:
(Pardon my boldness!
)
-
“Adds a function to the default main loop , (🡨 comma)
to be called whenever there are no higher priority events pending.”
(Problem: what it adds is actually a function call – if I imagine it well.
Therefore the comma is wrong.) -
“Adds a function to the default main loop to be called whenever there are no higher priority events pending.”
-
“Adds a function to the default main loop to be called as soon as there are no higher priority events pending.”
-
Adds a function call to the main loop to be performed as soon as there are no higher priority events pending.
-
Places a function call in the main loop to be performed as soon as there are no higher priority events pending.
I would “vote” for 2. But since my knowledge is very shallow, this is irrelevant ![]()
Note: I’m just trying to leave an ant-path behind, as I’m moving ahead, for others giving Gtk a go for the first time.
Peter