Skip to content

Commit

Permalink
Merge branch 'main' of github.com:amusecode/amuse
Browse files Browse the repository at this point in the history
  • Loading branch information
spzwart committed Oct 21, 2024
2 parents 4c0dc53 + 647a5f4 commit bf64b3b
Show file tree
Hide file tree
Showing 5 changed files with 2,085 additions and 1,477 deletions.
20 changes: 10 additions & 10 deletions src/amuse/rfi/async_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def get_mpi_request(self):
def get_socket(self):
raise Exception("not implemented")

#~ def is_pool(self):
#~ return False
# def is_pool(self):
# return False

def join(self, other):
if other is None:
Expand All @@ -82,8 +82,8 @@ def waits_for(self):
def __getitem__(self, index):
return IndexedASyncRequest(self,index)

#~ def __getattr__(self, name):
#~ print name, "<<"
# def __getattr__(self, name):
# print name, "<<"

def __add__(self, other):
return baseOperatorASyncRequest(self,other, operator.add)
Expand Down Expand Up @@ -127,8 +127,8 @@ def __iter__(self):
else:
yield self

#~ def __call__(self):
#~ return self.result()
# def __call__(self):
# return self.result()

class DependentASyncRequest(AbstractASyncRequest):
def __init__(self, parent, request_factory):
Expand Down Expand Up @@ -183,12 +183,12 @@ def is_result_available(self):
if self.request is None:
return False

#~ if not self.parent.is_finished:
#~ return False
# if not self.parent.is_finished:
# return False

if self.request is None:
return False
#~ raise Exception("something went wrong (exception of parent?)")
# raise Exception("something went wrong (exception of parent?)")

return self.request.is_result_available()

Expand Down Expand Up @@ -607,7 +607,7 @@ def add_request(self, async_request, result_handler = None, args=(), kwargs={}):
return
if async_request in self.registered_requests:
return
#~ raise Exception("Request is already registered, cannot register a request more than once")
# raise Exception("Request is already registered, cannot register a request more than once")

self.registered_requests.add(async_request)

Expand Down
Loading

0 comments on commit bf64b3b

Please sign in to comment.