(i)
| 1193 | |
| 1194 | def test_bson_encode_thread_safe(self): |
| 1195 | def target(i): |
| 1196 | for j in range(1000): |
| 1197 | my_int = type(f"MyInt_{i}_{j}", (int,), {}) |
| 1198 | bson.encode({"my_int": my_int()}) |
| 1199 | |
| 1200 | threads = [ExceptionCatchingTask(target=target, args=(i,)) for i in range(3)] |
| 1201 | for t in threads: |