Commit 0964862b authored by Philip Pronin's avatar Philip Pronin Committed by Facebook Github Bot

make parallel generator movable

Summary:
If `Source` isn't copyable, parallel generator cannot be composed
further due to implicitly deleted move ctor.

Example:

```
byLines(File(...))
| parallel(map(...))
| sum;
```

Reviewed By: ddrcoder, ot

Differential Revision: D10004477

fbshipit-source-id: 51ce23e834413bd53547a683f8ed89a1811f74a2
parent 4ca1b685
......@@ -172,11 +172,12 @@ class Parallel : public Operator<Parallel<Ops>> {
Composed,
Output,
OutputDecayed>> {
const Source source_;
const Ops ops_;
const size_t threads_;
typedef ClosableMPMCQueue<InputDecayed> InQueue;
typedef ClosableMPMCQueue<OutputDecayed> OutQueue;
Source source_;
Ops ops_;
size_t threads_;
using InQueue = ClosableMPMCQueue<InputDecayed>;
using OutQueue = ClosableMPMCQueue<OutputDecayed>;
class Puller : public GenImpl<InputDecayed&&, Puller> {
InQueue* queue_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment