-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devlib: Protect against too many BackgroundCommand
Since some servers (SSH) limit the number of active commands, ensure that we will not go over the limit for both the user-API Target.background() and using Target.execute.asyn() either. Achieve that by partitionning the slots in two bins: * User calls to Target.background(). Going over the limit will raise a TooManyBackgroundCommandsError exception. * Internal uses in Target.execute.asyn(). The number of background commands is tracked using a semaphore, and it will fallback to the blocking path if necessary.
- Loading branch information
1 parent
9bf55ef
commit 9c4c402
Showing
3 changed files
with
205 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters