MCPcopy Create free account
hub / github.com/davisking/dlib / add_task_by_value

Method add_task_by_value

dlib/threads/thread_pool_extension.h:591–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 (

Callers 5

find_max_globalFunction · 0.80
perform_testMethod · 0.80
asyncFunction · 0.80
threadMethod · 0.80
mainFunction · 0.80

Calls 3

add_task_internalMethod · 0.80
setMethod · 0.45
getMethod · 0.45

Tested by 1

perform_testMethod · 0.64