How do I wait for a license to become available?
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am on a network license with a limited number of licenses. If all the licenses for a particular product are checked out, and I try to use a command from that product, the command will fail. I would rather wait until the license is available before continuing my program.
Risposta accettata
MathWorks Support Team
il 28 Giu 2010
You can use the LICENSE command to stall until the license you need is available. Suppose you want to wait until a license of Real-Time Workshop is available.
license('checkout','Real-Time_Workshop')
will return either 1 or 0 depending on whether the RTW license is available or not. You have a block of code such as
while (~license('checkout','Real-Time_Workshop'))
% do nothing and wait indefinitely
end
% license checkout is successful, continue with rest of program
that will wait until the license is available.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Manage Products in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!