From d24297abf4390e88a972e67ba3fb35fe688d831f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 12 Apr 2016 01:07:39 -0400 Subject: multipart-replace: use condition variables instead of polling --- src/multipart-replace.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/multipart-replace.h') diff --git a/src/multipart-replace.h b/src/multipart-replace.h index e4cced0..d302c5f 100644 --- a/src/multipart-replace.h +++ b/src/multipart-replace.h @@ -31,7 +31,8 @@ struct multipart_replace_stream { struct frame a, b; struct frame *front, *back; pthread_rwlock_t frontlock; - long framecount; + pthread_cond_t newframe; + pthread_mutex_t newframe_lock; }; int multipart_replace_reader(struct multipart_replace_stream *s, int fd, const char *boundary); -- cgit v1.2.3-54-g00ecf