MCPcopy Create free account
hub / github.com/dwavesystems/dwave-cloud-client / wait_id

Method wait_id

dwave/cloud/computation.py:519–542  ·  view source on GitHub ↗

Blocking id getter. Return the submitted problem ID, but unlike :meth:`.id`, block until the ID becomes known, or until `timeout` expires. Args: timeout (float, default=None): Timeout in seconds. By default, wait indefinitely for problem

(self, timeout=None)

Source from the content-addressed store, hash-verified

517 self.solver.client._cancel(self.id, self)
518
519 def wait_id(self, timeout=None):
520 """Blocking id getter.
521
522 Return the submitted problem ID, but unlike :meth:`.id`, block until the
523 ID becomes known, or until `timeout` expires.
524
525 Args:
526 timeout (float, default=None):
527 Timeout in seconds. By default, wait indefinitely for problem
528 id to become known/available.
529
530 Returns:
531 str:
532 Problem ID, as returned by SAPI.
533
534 Raises:
535 :exc:`concurrent.futures.TimeoutError`:
536 When `timeout` exceeded, and problem id not ready.
537
538 """
539 if not self._id_ready_event.wait(timeout=timeout):
540 raise TimeoutError("problem id not available yet")
541
542 return self._id
543
544 @property
545 def id(self):

Calls 1

waitMethod · 0.45