()
| 204 | successes = [] |
| 205 | |
| 206 | def thread1_task() -> None: |
| 207 | try: |
| 208 | with testrepo.transaction() as txn: |
| 209 | txn.lock_ref(ref1_name) |
| 210 | thread1_ref1_locked.set() |
| 211 | thread2_ref2_locked.wait(timeout=5) |
| 212 | # this would cause a deadlock, so will throw (GitError) |
| 213 | txn.lock_ref(ref2_name) |
| 214 | # shouldn't get here |
| 215 | successes.append('thread1') |
| 216 | except Exception as e: |
| 217 | errors.append(('thread1', type(e).__name__, str(e))) |
| 218 | |
| 219 | def thread2_task() -> None: |
| 220 | try: |
nothing calls this directly
no test coverage detected
searching dependent graphs…