Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can this be resumed to “A consumer cannot be faster than the producer”?


The infection is the other way around here, the producer thread is slowed down due to a low priority of the consumer.

TLDR for article: the consumer has a lower priority and pauses on the context switch of the mutex lock, but doesn't get rescheduled for a while. The producer then has to wait for the consumer to get rescheduled and unlock the mutex before it can enqueue something.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: