| 589 | |
| 590 | template <typename F> |
| 591 | uint64 add_task_by_value ( |
| 592 | const F& function_object |
| 593 | ) |
| 594 | { |
| 595 | thread_pool_implementation::function_object_copy_instance<F>* ptr = 0; |
| 596 | ptr = new thread_pool_implementation::function_object_copy_instance<F>(function_object); |
| 597 | std::shared_ptr<thread_pool_implementation::function_object_copy> function_copy(ptr); |
| 598 | |
| 599 | |
| 600 | bfp_type temp; |
| 601 | temp.set(ptr->item); |
| 602 | uint64 id = impl->add_task_internal(temp, function_copy); |
| 603 | |
| 604 | return id; |
| 605 | } |
| 606 | |
| 607 | template <typename T> |
| 608 | uint64 add_task ( |