Is there a way to simplify the following, so I won’t need a runWithTimeout function?
let runWithTimeout timeout computation =
Async.RunSynchronously(computation, timeout)
let processOneItem item = fetchAction item
|> runWithTimeout 2000
Edit:
Here’s why i needed the extra method:
let processOneItem item = fetchAction item
|> Async.Catch
|> runWithTimeout 2000
|> handleExceptions
Perhaps you mean something like this: