[buoh/builder-port: 3/4] Upgrade threading code



commit 9cea40f59c348a8b261f72395e95eff49bd29755
Author: Jan Tojnar <jtojnar gmail com>
Date:   Mon Sep 10 04:27:29 2018 +0200

    Upgrade threading code
    
    g_thread_create is deprecated, we switched to g_thread_new.

 src/buoh-comic-loader.c | 5 +++--
 src/main.c              | 5 -----
 2 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/src/buoh-comic-loader.c b/src/buoh-comic-loader.c
index 845cd34..469f9a8 100644
--- a/src/buoh-comic-loader.c
+++ b/src/buoh-comic-loader.c
@@ -324,8 +324,9 @@ buoh_comic_loader_load_comic (BuohComicLoader *loader,
                                                        callback, gdata);
         loader->priv->job->loader = loader;
 
-        g_thread_create ((GThreadFunc) buoh_comic_loader_job_run,
-                         loader->priv->job, FALSE, NULL);
+        g_thread_new ("comic_loader",
+                      (GThreadFunc) buoh_comic_loader_job_run,
+                      loader->priv->job);
 }
 
 void
diff --git a/src/main.c b/src/main.c
index dc94ea9..3658f35 100644
--- a/src/main.c
+++ b/src/main.c
@@ -44,11 +44,6 @@ main (gint argc, gchar **argv)
         g_set_application_name (_("Buoh"));
         gtk_window_set_default_icon_name ("buoh");
 
-        /* Init threads */
-        if (!g_thread_supported ()) {
-                g_thread_init (NULL);
-        }
-
         buoh = buoh_new ();
         buoh_create_main_window (buoh);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]