next_available#

MapdlPool.next_available(return_index=False, as_ctx=False)[source]#

Wait until an instance of MAPDL is available and return that instance.

Parameters:
return_indexbool, optional

Return the index along with the instance. Default False.

Returns:
MapdlGrpc

Instance of MAPDL.

int

Index within the pool of the instance of MAPDL. By default this is not returned.

Examples

>>> mapdl = pool.next_available()
>>> print(mapdl)
Product:             Ansys Mechanical Enterprise
MAPDL Version:       24.1
ansys.mapdl Version: 0.68.dev0