Open 123qws opened 2 years ago
Hi @123qws ,
Sorry for the slow reply, this slipped my radar.
Yes, this is an unfortunate consequence of marl's tasks using std::function
, which in turn requires the wrapped function is CopyConstructible
. A minimal example of the problem can be seen here.
I did just notice that std::packaged_task
may act as a drop-in replacement that is less restrictive. Let me experiment a bit.
Cheers, Ben
Here's a simple example:
I got the following compile error:
The std::thread() lambda can take unique_ptr though. Any ideas? Thanks.