How to use asynchronous functions (original) (raw)
I’m trying to figure out how to create my own asynchronous function in C. But all roads lead to g_task_run_in_thread. But this is running a function in another thread. How to use asynchronous functions (as in Vala)?
mcatanzaro (Michael Catanzaro) August 7, 2024, 10:35pm 2
You want to use GTask. Review the documentation; it has examples to guide you.
It may be a little complicated your first time, but you’ll get used to it.
Rirusha (Vladimir Vaskov) August 8, 2024, 3:02pm 3
Thank you. I’ve read it. g_task_run_in_thread is really misleading, it was not immediately clear to me that GTask is just a tool for implementing asynchronous calls, and not a ready-made implementation.
ebassi (Emmanuele Bassi) August 8, 2024, 3:04pm 4
Outside of the class documentation, you probably want to read the Asynchronous Programming tutorial on the GNOME developers documentation website.
system (system) Closed September 22, 2024, 3:05pm 5
This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.