pjfanning commented on issue #175:
URL:
https://github.com/apache/incubator-pekko-http/issues/175#issuecomment-1580979621
@mdedetrich shouldn't this handle failures?
```
FileIO.fromPath(src.toPath)
.mapMaterializedValue { f =>
f.onComplete(_ => src.delete())
}
```
The `mapMaterializedValue` is working `Future[IOResult] => Unit`.
`Future#onComplete` works on `Try[IOResult]` so the `src.delete()` happens for
Success and Failure.
ShudownHooks
* use memory (what if we have millions of files)
* slow down the shutdown
For me, shutdown hooks are nearly as bad as finalizers.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]