1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 11:05:18 +00:00

infopipe tweaking

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@470 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Philip Kovacs 2006-01-06 00:35:49 +00:00
parent b4c6722219
commit 91ebd0263f
2 changed files with 7 additions and 6 deletions

View File

@ -63,8 +63,9 @@ void *infopipe_thread_func(void *pvoid)
int i,fd,runnable; int i,fd,runnable;
fd_set readset; fd_set readset;
struct timeval tm; struct timeval tm;
char buf[2048],*pbuf; static char buf[2048]; /* such equal or exceed sizeof(infopipe_t) */
infopipe_t items; static infopipe_t items;
char *pbuf;
pvoid=(void*)pvoid; /* useless cast to avoid unused var warning */ pvoid=(void*)pvoid; /* useless cast to avoid unused var warning */
@ -92,9 +93,9 @@ void *infopipe_thread_func(void *pvoid)
FD_ZERO(&readset); FD_ZERO(&readset);
FD_SET(fd,&readset); FD_SET(fd,&readset);
/* The select() below can block for a brief time (tm value) and is /* The select() below can block for time tm and is ideally suited
ideally suited for a worker thread such as this. We don't want for a worker thread such as this. We don't want to slow down
to slow down ui updates in the main thread as there is already user interface updates in the main thread as there is already
excess latency there. */ excess latency there. */
if (select(fd+1,&readset,NULL,NULL,&tm) == 1) { /* something to read */ if (select(fd+1,&readset,NULL,NULL,&tm) == 1) { /* something to read */

View File

@ -50,7 +50,7 @@ enum _infopipe_keys {
}; };
/* 14 slots for the infopipe values */ /* 14 slots for the infopipe values */
typedef char infopipe_t[14][256]; typedef char infopipe_t[14][128];
/* Service routine for the conky main thread */ /* Service routine for the conky main thread */
void update_infopipe(void); void update_infopipe(void);