summaryrefslogtreecommitdiff
path: root/src/network_gthread_sendfile.c
diff options
context:
space:
mode:
authorstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2009-10-25 17:32:27 +0000
committerstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2009-10-25 17:32:27 +0000
commit5462f9f54893ef54c6c992a90b36a49e045cbc41 (patch)
treebf00d2fe926456b797e1034be78c620f78730f4f /src/network_gthread_sendfile.c
parent56e523b46ec3f38c247222544c34fa2db0bdd48c (diff)
downloadlighttpd-5462f9f54893ef54c6c992a90b36a49e045cbc41.tar.gz
Remove joblist thread, don't use timed pops for async queues
* Less spam in strace, should result in less overhead with joblist queue git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@2673 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/network_gthread_sendfile.c')
-rw-r--r--src/network_gthread_sendfile.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/network_gthread_sendfile.c b/src/network_gthread_sendfile.c
index 39a40087..b39a082d 100644
--- a/src/network_gthread_sendfile.c
+++ b/src/network_gthread_sendfile.c
@@ -77,24 +77,16 @@ gpointer network_gthread_sendfile_read_thread(gpointer _srv) {
server *srv = (server *)_srv;
GAsyncQueue * inq;
- GAsyncQueue * outq;
- g_async_queue_ref(srv->joblist_queue);
g_async_queue_ref(srv->aio_write_queue);
- outq = srv->joblist_queue;
inq = srv->aio_write_queue;
/* */
while (!srv->is_shutdown) {
- GTimeVal ts;
write_job *wj = NULL;
- /* wait one second as the poll() */
- g_get_current_time(&ts);
- g_time_val_add(&ts, 500 * 1000);
-
- if ((wj = g_async_queue_timed_pop(inq, &ts))) {
+ if ((wj = g_async_queue_pop(inq))) {
/* let's see what we have to stat */
ssize_t r;
off_t offset;
@@ -147,14 +139,13 @@ gpointer network_gthread_sendfile_read_thread(gpointer _srv) {
timing_log(srv, con, TIME_SEND_ASYNC_READ_END_QUEUED);
/* read async, write as usual */
- g_async_queue_push(outq, wj->con);
+ joblist_async_append(srv, wj->con);
write_job_free(wj);
}
}
g_async_queue_unref(srv->aio_write_queue);
- g_async_queue_unref(srv->joblist_queue);
return NULL;