aboutsummaryrefslogtreecommitdiffstats
path: root/src/ringbuf.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-06-30 02:43:13 +0000
committerEric Wong <normalperson@yhbt.net>2008-06-30 02:43:13 +0000
commit2a5dcba5edaaf241ea85ec6cad7ccd9665774ee4 (patch)
tree9ccb6008bf7d841342404019d163851ac9d001b8 /src/ringbuf.c
parentc71cfbac7a461734fad2982867701bba8874f359 (diff)
downloadmpd-2a5dcba5edaaf241ea85ec6cad7ccd9665774ee4.tar.gz
mpd-2a5dcba5edaaf241ea85ec6cad7ccd9665774ee4.tar.xz
mpd-2a5dcba5edaaf241ea85ec6cad7ccd9665774ee4.zip
http: initial rewrite using ringbuffer + pthreads
This institutes the usage of a separate thread to buffer HTTP input. It is basically practice code for using the ringbuffer code which I plan on reusing for the OutputBuffer as well as further input buffering for disk (networked filesystems over WAN, laptops on battery, etc). Each readFromInputStream() call on an HTTP stream can take several seconds to complete, short reads are avoided. A single-threaded solution for systems supporting large enough SO_RCVBUF values should also be possible and will likely be done in the future; but this lock-free(except when full/empty) ringbuffer is cool :) git-svn-id: https://svn.musicpd.org/mpd/trunk@7393 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/ringbuf.c')
0 files changed, 0 insertions, 0 deletions