Quoting [Daniel Gruber] (Mar 01 2010):
Hi,
while scanning the wiki I found following:
The Job object methods should throw following exceptions:
- "JobAlreadySuspendedException" from suspend method when
job is already suspended. The DRMAA implementation have
to make sure that suspend job is just called once. It is not enough
for the DRMAA implementation to rely on own state, it should
check the state automatically in order to avoid problems when
the state is set outside of DRMAA. Should DRMAA deal with
such cases?
*Can* DRMAA deal with such cases? These are two operations which
are usually not atomic (1: check for state, 2: suspend) - so how can
a DRMAA client side library ensure that the remote state does not
change between these two calls, e.g. due to a 3rd part API call?
I guess it's ok to throw when the backend replies with that error
(job already suspended) - but requiring the DRMAA implementation to
ensure atomicity is most likely futile.
my $0.02, Andre.
You're right - atomicity seems not to be possible.