Skip to content

Conversation

@westonpace
Copy link
Owner

I may have been a little optimistic. This approach should be able to work. However, we may have to expose C++'s async API to make it happen. The problem with using a sync call is...

Table ReadParquet() {
  Future<Table> table = ScheduleReadParquetTask();
  // At this point we are going to block the main R thread.  We don't want to do that.  We want
  // to re-use the main R thread for I/O tasks.  We can't call later::run_now because are not R-aware here
  // and we don't want to pepper the C++ code base with something like MAYBE_YIELD_TO_R
  return table.result();
  // By the time we return it is too late to call later::run_now.  Any child tasks needed to read the parquet
  // file (e.g. reading from a connection) must have completed by now.
}

When using an async call...

Future<Table> ReadParquet() {
  return ScheduleReadParquetTask();
  // At this point the work has started but not finished.  Once we return from this method we can
  // call later::run_now from an R context.
}

Also, I'm not using later::run_now because we have event loops in C++ already (SerialExecutor). But, you could definitely use later event loops if you wanted.

@github-actions
Copy link

github-actions bot commented Mar 4, 2022

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on JIRA? https://issues.apache.org/jira/browse/ARROW

Opening JIRAs ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename pull request title in the following format?

ARROW-${JIRA_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

@github-actions github-actions bot added the lang-R label Mar 4, 2022
@westonpace westonpace force-pushed the experiment/serial-generator branch from c4d7f07 to 2978c1b Compare March 4, 2022 22:00
@westonpace westonpace force-pushed the experiment/serial-generator branch 2 times, most recently from 4fd18dc to e3f588f Compare March 25, 2022 02:17
@westonpace westonpace force-pushed the experiment/serial-generator branch from e3f588f to c4464dd Compare March 29, 2022 21:58
westonpace pushed a commit that referenced this pull request Jul 14, 2022
…ation (apache#13579)

When locally building the `conda-cpp-valgrind` docker image I've realised we are prompting for confirmation:

```
#10 12.35 Confirm changes: [Y/n] 
#10 88.01  
```
We should use the -y flag when using mamba install:
```
  -y, --yes             Do not ask for confirmation.
```
With this change we are no longer seeing the `Confirm changes` message from mamba.

Authored-by: Raúl Cumplido <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
@westonpace westonpace closed this Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants