How do I wait for a license to become available?
16 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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.
Respuesta aceptada
MathWorks Support Team
el 28 de Jun. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Manage Products en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!