Wow ! I had completely overlooked the fact that `channel` was in fact a
queue ! I only saw it as a means to send data.
Thanks a lot !
On Thu, 2017-08-24 at 14:03 +0200, Thomas Heller wrote:
> Hi Jean-Loup,
>
> Am 24.08.2017 1:07 nachm. schrieb "Jean-Loup Tastet" <jean-loup.taste
> [email protected]>:
> > Hi all,
> >
> > I am currently looking for a data structure that basically behaves
> > like TBB's `concurrent_queue<T>`, except for the `pop()` operation
> > which would return a `hpx::future<T>`, and would never fail. This
> > way, `get()`-ting the result would suspend the thread until the
> > `pop()` has succeeded (possibly never if the queue remains empty).
> > Such a queue would be very useful to manage tasks awaiting
> > computing resources such as preallocated memory buffers or CUDA
> > streams.
>
> hpx::lcos::local::channel is exactly what you need.
>
> > In my specific use case, the queue would only need to be local, and
> > should not be accessed from another locality (same NUMA domain
> > should be okay, though). Moreover, I will only need T = unsigned
> > int.
> >
> > I can certainly roll-out my own version of such a concurrent queue
> > if needed, but I would prefer to avoid reinventing the square wheel
> > if something similar already exists :-)
> >
> > Is any of you aware of such a data structure or of a similar one ?
> > Thanks in advance for your suggestions.
> >
> > Best regards,
> > Jean-Loup Tastet
> > _______________________________________________
> >
> > hpx-users mailing list
> >
> > [email protected]
> >
> > https://mail.cct.lsu.edu/mailman/listinfo/hpx-users
> >
> >
>
>
> _______________________________________________
> hpx-users mailing list
> [email protected]
> https://mail.cct.lsu.edu/mailman/listinfo/hpx-users
_______________________________________________
hpx-users mailing list
[email protected]
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users