You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a library keyword calls another keyword by using BuiltIn.run_keyword, timeouts are deactivated and the calling keyword is not stopped if it takes too much time or even hangs. For example, this keyword hangs and timeouts cannot stop it:
This problem doesn't occur on Windows, because there the low level timeout implementation is different than on other platforms. The underlying reason is that outside Windows timeouts are implemented using signals that are enabled when a library keyword starts and disabled when it ends. When a library keyword calls another keyword via BuiltIn.run_keyword, timeouts are disabled when the called keyword ends. This is easy to fix by keeping count on how many times signals have been activated and deactivating them only when that count gets to zero.
I noticed this when investigating how to prevent output files being corrupted if a library keywords uses Builtin.run_keyword and timeouts are used (#5417). This issue explains why that problem manifested itself only on Windows and with this issue fixed that problem occurs also elsewhere. That can be considered a bad and backwards incompatible thing, but I still believe it's better to fix this issue. If we want to fix #5417 by disabling timeouts if BuiltIn.run_keyword is used, we should do it explicitly and consistently on all platforms.
The text was updated successfully, but these errors were encountered:
If a library keyword calls another keyword by using
BuiltIn.run_keyword
, timeouts are deactivated and the calling keyword is not stopped if it takes too much time or even hangs. For example, this keyword hangs and timeouts cannot stop it:This problem doesn't occur on Windows, because there the low level timeout implementation is different than on other platforms. The underlying reason is that outside Windows timeouts are implemented using signals that are enabled when a library keyword starts and disabled when it ends. When a library keyword calls another keyword via
BuiltIn.run_keyword
, timeouts are disabled when the called keyword ends. This is easy to fix by keeping count on how many times signals have been activated and deactivating them only when that count gets to zero.I noticed this when investigating how to prevent output files being corrupted if a library keywords uses
Builtin.run_keyword
and timeouts are used (#5417). This issue explains why that problem manifested itself only on Windows and with this issue fixed that problem occurs also elsewhere. That can be considered a bad and backwards incompatible thing, but I still believe it's better to fix this issue. If we want to fix #5417 by disabling timeouts ifBuiltIn.run_keyword
is used, we should do it explicitly and consistently on all platforms.The text was updated successfully, but these errors were encountered: