andreiavrammsd / cpp-channel

Thread-safe container for sharing data between threads
https://blog.andreiavram.ro/cpp-channel-thread-safe-container-share-data-threads/
MIT License
415 stars 30 forks source link

Use channel as an input_iterator #35

Open schaumb opened 1 year ago

schaumb commented 1 year ago

Currently, the channel iterators can be used only as output iterators.

Integrates well with STL algorithms.

If I want to pipe two channels, there is no support for the STL algorithms:

msd::channel<int> one;
msd::channel<int> two;
std::copy(one.begin(), one.end(), two.end());
andreiavrammsd commented 1 year ago

I'll leave this open for a while to see if I get to it.