GithubHelp home page GithubHelp logo

Comments (2)

installgentoo avatar installgentoo commented on June 13, 2024

Okay i tested this, doesn't seem to crash anything, shouldn't have races. Here's the patch

--- a/src/utilops.cc
+++ b/src/utilops.cc
@@ -35,6 +35,7 @@
 #include "metadata.h"
 #include "exif.h"
 
+#include <thread>
 #define DIALOG_WIDTH 750
 
 static GdkPixbuf *file_util_get_error_icon(FileData *fd, GList *list, GtkWidget *widget);
@@ -1202,8 +1203,10 @@
 
 static void file_util_dest_folder_entry_cb(GtkWidget *UNUSED(entry), gpointer data)
 {
+	std::thread([=] {
 	auto ud = static_cast<UtilityData *>(data);
 	file_util_dest_folder_update_path(ud);
+	}).detach();
 }
 
 /* format: * = filename without extension, ## = number position, extension is kept */


from geeqie.

WojciechMula avatar WojciechMula commented on June 13, 2024

A detached thread will be unconditionally terminated when Geeqie process is closed before moving is done.

A perfect solution would be a thread that gets commands from other components and perform some possibly long-running operation and that can be queried by the main thread about progress/pending ops.

from geeqie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.