From d7635e7c1b948937fc0117315e223a038a6ed81b Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Thu, 2 Feb 2006 01:43:43 +0000 Subject: [PATCH] stuff git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@523 7f574dfc-610e-0410-a909-a81674777703 --- src/conky.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/conky.c b/src/conky.c index 68f39e7a..34ff96c0 100644 --- a/src/conky.c +++ b/src/conky.c @@ -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);