()
| 217 | errors.append(('thread1', type(e).__name__, str(e))) |
| 218 | |
| 219 | def thread2_task() -> None: |
| 220 | try: |
| 221 | with testrepo.transaction() as txn: |
| 222 | txn.lock_ref(ref2_name) |
| 223 | thread2_ref2_locked.set() |
| 224 | thread1_ref1_locked.wait(timeout=5) |
| 225 | # this would cause a deadlock, so will throw (GitError) |
| 226 | txn.lock_ref(ref2_name) |
| 227 | # shouldn't get here |
| 228 | successes.append('thread2') |
| 229 | except Exception as e: |
| 230 | errors.append(('thread2', type(e).__name__, str(e))) |
| 231 | |
| 232 | thread1 = threading.Thread(target=thread1_task) |
| 233 | thread2 = threading.Thread(target=thread2_task) |
nothing calls this directly
no test coverage detected
searching dependent graphs…