how exercise patience review controlling posix threads
i exercise producer/consumer unfolding obeys interfaces roughly:
class consumer {
private:
vector<char> read(size_t n) {
// middle aegis `n` elements, following dequeue them
// differently wait some-more information try again
}
public:
vacant run() {
read(10);
read(4839);
// etc
}
vacant feed(const vector<char> &more) {
// safely reserve data
// report `read` there some-more data
}
};
in case, feed run run removed threads read should patience review (like recv fread). obviously, i need kind mutual ostracism deque, i need kind presentation component surprise read try again.
i hear condition variables proceed go, nonetheless multithreading trust lies windows am carrying tough jacket conduct around them.
thanks any help!
(yes, i know it's ruin relapse vectors. let's that.)
Comments
Post a Comment