| 66 | |
| 67 | def test_when_calling_bound_member_in_another_thread_then_doesnt_error(self): |
| 68 | class MyFlag(_openassetio._testutils.Flag): |
| 69 | def __init__(self): |
| 70 | self.value = None |
| 71 | _openassetio._testutils.Flag.__init__(self) |
| 72 | |
| 73 | def set(self, value): |
| 74 | assert threading.current_thread().ident != main_thread_id |
| 75 | self.value = value |
| 76 | |
| 77 | def get(self): |
| 78 | return self.value |
| 79 | |
| 80 | flag = MyFlag() |
| 81 | main_thread_id = threading.current_thread().ident |
no outgoing calls