Skip to content

Commit 2f86e0d

Browse files
Now the 'callr' backend finalizes the 'callr' process as soon as the future results have been collected [#33]
1 parent c6c5d01 commit 2f86e0d

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: future.callr
2-
Version: 0.10.1-9001
2+
Version: 0.10.1-9002
33
Depends:
44
R (>= 3.4.0),
55
future (>= 1.58.0)
@@ -26,5 +26,5 @@ URL: https://future.callr.futureverse.org, https://github.com/futureverse/future
2626
BugReports: https://github.com/futureverse/future.callr/issues
2727
Language: en-US
2828
Encoding: UTF-8
29-
RoxygenNote: 7.3.2
29+
RoxygenNote: 7.3.3
3030
Roxygen: list(markdown = TRUE)

NEWS.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Version (development version)
22

3-
* ...
3+
## New Features
4+
5+
* Now the 'callr' backend finalizes the 'callr' process as soon as
6+
the future results have been collected. This results in removing
7+
temporary files created by **callr** sooner. Previously, the
8+
finalizer was only run when the future object was removed and
9+
garbage collected.
410

511

612
# Version 0.10.1 [2025-07-10]

R/CallrFutureBackend-class.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,10 @@ await <- function(future, ...) {
456456
if (FutureRegistry(reg, action = "contains", future = future)) {
457457
FutureRegistry(reg, action = "remove", future = future)
458458
}
459+
460+
## Finalize the 'callr' process, which includes remove any temporary
461+
## files that it created
462+
process$finalize()
459463
}
460464

461465
## Failed to launch?
@@ -526,6 +530,10 @@ await <- function(future, ...) {
526530

527531
reg <- backend[["reg"]]
528532
FutureRegistry(reg, action = "remove", future = future)
533+
534+
## Finalize the 'callr' process, which includes remove any temporary
535+
## files that it created
536+
process$finalize()
529537

530538
result
531539
} # await()

0 commit comments

Comments
 (0)