stuff
authorBrenden Matthews <brenden1@rty.ca>
Thu, 2 Feb 2006 01:43:43 +0000 (01:43 +0000)
committerBrenden Matthews <brenden1@rty.ca>
Thu, 2 Feb 2006 01:43:43 +0000 (01:43 +0000)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@523 7f574dfc-610e-0410-a909-a81674777703

src/conky.c

index 68f39e7..34ff96c 100644 (file)
@@ -1050,7 +1050,9 @@ void *threaded_exec(struct text_object *obj) { // pthreads are really beginning
        double update_time;
        while (1) {
                update_time = get_time();
-               pthread_mutex_lock(&(obj->data.execi.thread_info.mutex));
+               if (pthread_mutex_trylock(&(obj->data.execi.thread_info.mutex))) {
+                       break;
+               }
                char *p2 = obj->data.execi.buffer;
                FILE *fp = popen(obj->data.execi.cmd,"r");
                int n2 = fread(p2, 1, TEXT_BUFFER_SIZE, fp);