Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-12208

[C++] Add the ability to run async tasks without using the CPU thread pool

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0
    • C++

    Description

      This is required allow Windows 32-bit RTools 3.5 builds avoid crashing as they don't seem to properly implement the `<threading>` header.

       

      However, it could be generally useful to anyone that wants to avoid thread creation.

       

      Currently, the asynchronous approaches introduce necessary threading.  For example, even a simple call to check if the CSVFileFormat supports a file requires peeking the file and reading the first block.  These I/O operations happen on the I/O pools and then are transferred to the CPU thread pool (which is NOT the same thing as the calling thread) meanwhile the calling thread is blocked waiting for results.

       

      This can be avoided by treating the calling thread as a single threaded thread pool and then using that as the CPU thread pool.  This allows all CPU work to be done on the calling thread alone.  This could also allow us to remove duplicate code paths (e.g. code paths that exist only to keep functions serial such as the serial CSV reader) in the future.

       

      This capability could be extended to include the I/O thread pool as well at some point in the future.

      Attachments

        Issue Links

          Activity

            People

              westonpace Weston Pace
              westonpace Weston Pace
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 7h 50m
                  7h 50m