diff options
| author | Onur Gündüz <ogunduz@gmail.com> | 2026-06-24 02:29:52 +0200 |
|---|---|---|
| committer | Onur Gündüz <ogunduz@gmail.com> | 2026-06-24 02:29:52 +0200 |
| commit | dc29ac64a203a954161026ad5f6288df201e11ad (patch) | |
| tree | 019f84f6a15b53b6134d75ef7f539f986a918fda /tools/server/schedule.c | |
| parent | cb85a499f3d5178a752c85063bf9ff277ca3a71e (diff) | |
| download | ffwd-dc29ac64a203a954161026ad5f6288df201e11ad.tar.gz ffwd-dc29ac64a203a954161026ad5f6288df201e11ad.zip | |
server: fix tokenizer data race under concurrency
Diffstat (limited to 'tools/server/schedule.c')
| -rw-r--r-- | tools/server/schedule.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/tools/server/schedule.c b/tools/server/schedule.c index 8fb4231..13e5dc7 100644 --- a/tools/server/schedule.c +++ b/tools/server/schedule.c @@ -182,17 +182,6 @@ int worker_has_pending_jobs(http_server *s) { return pending; } -/* True when work is already queued anywhere ahead of the worker (untokenized or - * tokenized). dispatch routes a new request to the tokenizer thread when this - * holds, so tokenization overlaps in-flight work; an otherwise idle pipeline - * tokenizes the request inline on the worker and skips the queue hand-off. */ -int server_has_backlog(http_server *s) { - pthread_mutex_lock(&s->mu); - int busy = s->raw_head != NULL || s->job_head != NULL; - pthread_mutex_unlock(&s->mu); - return busy; -} - void enqueue_job(job *j) { http_server *s = j->srv; pthread_mutex_lock(&s->mu); |
