forked from mindspore-Ecosystem/mindspore
!1306 Adding warning to sync_wait usage
Merge pull request !1306 from EricZ/master
This commit is contained in:
commit
ba01949d8f
|
@ -1301,6 +1301,8 @@ class SyncWaitDataset(DatasetOp):
|
|||
self._pair = BlockReleasePair(num_batch, callback)
|
||||
if self._condition_name in self.input[0].get_sync_notifiers():
|
||||
raise RuntimeError("Condition name is already in use")
|
||||
logger.warning("Please remember to add dataset.sync_update(condition=%s), otherwise will result in hanging",
|
||||
condition_name)
|
||||
|
||||
def get_sync_notifiers(self):
|
||||
return {**self.input[0].get_sync_notifiers(), **{self._condition_name: self._pair.release_func}}
|
||||
|
|
Loading…
Reference in New Issue