Ensure simultaneous emptying of stdout and stderr when concurrent resources are available. When employing multiprocessing with standard I/O redirected to files, it is crucial to clear internal data for examination or prevent log loss in case of system failures."
(self)
| 75 | 'instead.') |
| 76 | |
| 77 | def flush(self): |
| 78 | """Ensure simultaneous emptying of stdout and stderr when concurrent |
| 79 | resources are available. |
| 80 | |
| 81 | When employing multiprocessing with standard I/O redirected to files, |
| 82 | it is crucial to clear internal data for examination or prevent log |
| 83 | loss in case of system failures." |
| 84 | """ |
| 85 | if hasattr(self, 'tokens'): |
| 86 | sys.stdout.flush() |
| 87 | sys.stderr.flush() |
| 88 | |
| 89 | def acquire(self): |
| 90 | """Acquire concurrent resources if exists. |
no outgoing calls
no test coverage detected