[gvfs] mtp: limit number of threads



commit 14032ee48bab618e9e7c75134f1c653e996bc4dd
Author: Ondrej Holy <oholy redhat com>
Date:   Tue Nov 4 12:47:04 2014 +0100

    mtp: limit number of threads
    
    Mtp backend doesn't limit number of threads, however all methods
    are executed with locked mutex thus multiple threads isn't needed.
    Do not waste resources and limit maximal number of threads to one.
    This patch could potentially avoid some crashes during unmount.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=739575

 daemon/Makefile.am |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index a6a9ae1..7a4b01b 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -493,6 +493,7 @@ gvfsd_mtp_CPPFLAGS = \
        $(flags) \
        -DBACKEND_HEADER=gvfsbackendmtp.h \
        -DDEFAULT_BACKEND_TYPE=mtp \
+       -DMAX_JOB_THREADS=1 \
        -DBACKEND_TYPES='"mtp", G_VFS_TYPE_BACKEND_MTP,' \
        $(GUDEV_CFLAGS) $(LIBMTP_CFLAGS)
 


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