Home | History | Annotate | Download | only in ops

Lines Matching defs:CriticalSection

23 # TODO(ebrevdo): Re-enable once CriticalSection is in core.
46 class CriticalSection(object):
49 A `CriticalSection` object is a resource in the graph which executes subgraphs
76 cs = CriticalSection()
105 ex1 = CriticalSection().execute(
107 ex2 = CriticalSection().execute(
126 # TODO(ebrevdo): Re-enable once CriticalSection is in core.
137 """Initialize the CriticalSection from constructor arguments."""
138 with ops.name_scope(name, "CriticalSection", []) as name:
156 """Execute function `fn(*args, **kwargs)` inside the CriticalSection.
166 `fn` should be exclusive to this `CriticalSection`. Default: `True`.
174 ValueError: If `fn` attempts to use this `CriticalSection` in any nested
177 another `CriticalSection` has an execution requesting the same
180 if another execution in another `CriticalSection` was created without
194 "CriticalSection in which it would be running. This "
196 "CriticalSection: %s." % self._handle)
216 "execution (CriticalSection: %s) or Execution '%s' "
217 "(CriticalSection: %s) requested exclusive resource access "
249 # TODO(ebrevdo): Re-enable once CriticalSection is in core.
252 # """Converts a `CriticalSection` to a `CriticalSectoinDef` protocol buffer.
259 # `CriticalSection` is not in the specified name scope.
271 # return CriticalSection(
275 # TODO(ebrevdo): Re-enable once CriticalSection is in core.
317 # to_proto=CriticalSection.to_proto,
318 # from_proto=CriticalSection.from_proto)