Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::experimental::packaged_task(library fundamentals TS)

      From cppreference.com
      <cpp‎ |experimental‎ |lib extensions
       
       
       
       
       

      This page is about the modified version ofstd::packaged_task with type-erased allocator support provided by the Library Fundamentals TSes. For the version ofpackaged_task provided by the concurrency TS supporting thestd::future improvements made by that TS, seestd::experimental::concurrency_v1::packaged_task.

      Defined in header<experimental/future>
      template<class>class packaged_task;//not defined
      (1)(library fundamentals TS)
      template<class R,class ...Args>
      class packaged_task<R(Args...)>;
      (2)(library fundamentals TS)

      std::experimental::fundamentals_v1::packaged_task (andstd::experimental::fundamentals_v2::packaged_task) is a modified version ofstd::packaged_task provided by the library fundamentals TS with support for type-erased allocators.

      Contents

      [edit] Member types

      Member type Definition
      allocator_typestd::experimental::erased_type

      [edit] Member functions

      constructs the task object
      (public member function)[edit]
      retrieves a pointer to the memory resource used by this object to allocate memory
      (public member function)[edit]

      [edit] Non-member function

      specializes theswap algorithm
      (function template)[edit]

      [edit]Helper classes

      specializes thestd::uses_allocator type trait
      (class template specialization)[edit]

      Members identical tostd::packaged_task

      Member functions

      destructs the task object
      (public member function ofstd::packaged_task<R(Args...)>)[edit]
      moves the task object
      (public member function ofstd::packaged_task<R(Args...)>)[edit]
      checks if the task object has a valid function
      (public member function ofstd::packaged_task<R(Args...)>)[edit]
      swaps two task objects
      (public member function ofstd::packaged_task<R(Args...)>)[edit]
      Getting the result
      returns astd::future associated with the promised result
      (public member function ofstd::packaged_task<R(Args...)>)[edit]
      Execution
      executes the function
      (public member function ofstd::packaged_task<R(Args...)>)[edit]
      executes the function ensuring that the result is ready only once the current thread exits
      (public member function ofstd::packaged_task<R(Args...)>)[edit]
      resets the state abandoning any stored results of previous executions
      (public member function ofstd::packaged_task<R(Args...)>)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/experimental/lib_extensions/packaged_task&oldid=98618"

      [8]ページ先頭

      ©2009-2025 Movatter.jp