Skip to content

Commit

Permalink
Revert "Fixing race condition on mesh (#1448)"
Browse files Browse the repository at this point in the history
This reverts commit ae0153c.
  • Loading branch information
germa89 committed Oct 11, 2022
1 parent 4d49845 commit e8d11aa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ansys/mapdl/core/mesh_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def _update_cache(self):
self._mapdl.nsle("S", mute=True)

# not thread safe
self._update_cache_elem()
self._update_cache_elem().join()

threads = [
self._update_cache_element_desc(),
Expand Down Expand Up @@ -540,6 +540,7 @@ def _load_nodes(self, chunk_size=DEFAULT_CHUNKSIZE):
nodes = parse_chunks(chunks, np.double).reshape(-1, 3)
return nodes

@threaded
def _update_cache_elem(self):
"""Update the element and element offset cache"""
if self._cache_elem is None:
Expand All @@ -553,7 +554,7 @@ def _elem(self):
in offset. Each element contains 10 items plus the nodes
belonging to the element.
"""
self._update_cache_elem()
self._update_cache_elem().join()
return self._cache_elem

@_elem.setter
Expand All @@ -563,7 +564,7 @@ def _elem(self, value):
@property
def _elem_off(self):
"""Element offset array"""
self._update_cache_elem()
self._update_cache_elem().join()
return self._cache_elem_off

@_elem_off.setter
Expand Down

0 comments on commit e8d11aa

Please sign in to comment.