Poster
#
- class ansys.mechanical.core.embedding.poster.Poster#
Class which can post a python callable function to Mechanical’s main thread.
Overview#
Import detail#
from ansys.mechanical.core.embedding.poster import Poster
Method detail#
- Poster.try_post(callable: Callable) Any #
Post the callable to Mechanical’s main thread.
This does the same thing as post but if callable raises an exception, try_post will raise the same exception to the caller of try_post.
- Poster.post(callable: Callable) Any #
Post the callable to Mechanical’s main thread.
The main thread needs to be receiving posted messages in order for this to work from a background thread. Use the sleep routine from the utils module to make Mechanical available to receive messages.
Returns the result of callable if any.