I am writing a Rust wrapper for libairspy. It is a C library for controlling software defined radio called Airspy.
With this commit I added initial support for getting IQ data samples out of callback.
It works, but it is not safe and should be rewritten.
I would like to get some suggestions how message passing from C callback to Iterator should be rewritten.
Currently it is done like this.
Semaphore is not stable in Rust 1.1 therefore I am using ipc::Semaphore. However I did not quite figure out how to use it for implementing double buffering producer/consumer.