Creates a critical section.
(self, name=None, shared_name=None,
critical_section_def=None, import_scope=None)
| 142 | """ |
| 143 | |
| 144 | def __init__(self, name=None, shared_name=None, |
| 145 | critical_section_def=None, import_scope=None): |
| 146 | """Creates a critical section.""" |
| 147 | context.ensure_initialized() |
| 148 | if critical_section_def and name is not None: |
| 149 | raise ValueError("critical_section_def and shared_name are " |
| 150 | "mutually exclusive.") |
| 151 | if critical_section_def: |
| 152 | self._init_from_proto(critical_section_def, import_scope=import_scope) |
| 153 | else: |
| 154 | self._init_from_args(name, shared_name) |
| 155 | |
| 156 | def _init_from_proto(self, critical_section_def, import_scope): # pylint: disable=invalid-name |
| 157 | raise NotImplementedError("Not yet implemented") |
nothing calls this directly
no test coverage detected