Hi,
I'm using the following code to stop an operation if it takes too long and perform another operation instead:
require(R.utils)
tryCatch(
{
withTimeout(
{
print("hello1")
},
timeout = 10)
},
TimeoutException = {
print("hello2")
}
)
When I run it, the result is:
[1] "hello2"
[1] "hello1"
I don't think that "hello2" should be returned. Please can you tell me what I am doing wrong?
Thanks.