### Bug description

I'm trying to generate parameterized reports in parallel on Ubuntu 22.04 LTS using `quarto=1.2.335`. For this, I'm using the following `test.qmd` file:

```r
---
title: paralell report generation fails
params:
  counter: 1
format:
  html:
    embed-resources: true
---

\```{r}
Sys.sleep(5)
\```

This is report number `r params$counter`
```

Generating both report `out1.html` and `out2.html` works fine when running sequentially:

```sh
quarto render test.qmd -P counter:1 --output out1.html
quarto render test.qmd -P counter:2 --output out2.html
```

However, when I try to run them in parallel I get:

```
quarto render test.qmd -P counter:1 --output out1.html &;
quarto render test.qmd -P counter:2 --output out2.html
# Error in readLines(con, warn = FALSE) : cannot open the connection
# Calls: .main ... partition_yaml_front_matter -> grep -> is.factor -> read_utf8 -> readLines
```

I suspect this is because both reports store their temporary files in `test_files/`. Wouldn't it make more sense to use the output file base as directory, because this should not conflict?

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
2023-03-09T09:18:16Z
mschubert
enhancement
Future
open
Parallel creation of parameterized reports fails due to file conflicts
https://github.com/quarto-dev/quarto-cli/issues/4730