Jan Niklas Hasse

Results 121 comments of Jan Niklas Hasse

> Unless the ninja patches go upstream I don't think we can rely on ninja for this. FYI: It's very very likely that those Ninja patches will go upstream soon...

Just noticed that someone started working on this: https://github.com/hhatinen/ears/commit/693fef58943e4f2d1858c821e51d4bd7f9487dad @hhatinen Are you planning to also create a PR? :)

Understandable. Thanks! (and sorry for pinging you out of the blue)

I hope you're okay with that I cherry-picked your commit on my fork: https://github.com/jhasse/ThreadPool/commit/5c54162f761c12c82ff3746305652936dcdfa56f :)

What should happen when the maximum is reached? Throw an exception or block until a task has finished?

I've managed to implement 1: https://github.com/jhasse/ThreadPool/commit/428aeaed8b20aaafafdb2d9b007a85d571de85bf But I'm having troubles with 3. This is what I've come up with so far: ```cpp std::packaged_task task( std::bind(std::forward(f), std::forward(args)...) ); std::future res =...

We could use unique_ptr though :)

Okay I misunderstood the problem. https://stackoverflow.com/questions/32486623/moving-a-lambda-once-youve-move-captured-a-move-only-type-how-can-the-lambda The solution is to replace `std::function` with an implementation which also works with move-only Callables. I've found `fu2::unique_function` from here: https://github.com/Naios/function2 The end result...

Or even easier: Simple move the packaged_task as suggested here: #51

I don't think this repository is maintained any more, so I wouldn't bother with a PR. See my C++17 fork here: https://github.com/jhasse/ThreadPool