Single buffer accessed by two threads

It is possible to use a Queue, but that might not be the most efficient for this kind of application. Queues are useful for servers and to create APIs to a server.

I would recommend reading about Stream Buffers, and here some examples.

Also worth reading is about Counting Semaphores.

A light-weight method of waking up a task is Task Notification, and more explanation here.

Many possibilities, find what feels good for your application.