tests/system/action/lock.py
def write(self, write_request: WriteRequest) -> None:  # type: ignore
    """
    Wraps the write of the datastore.adapter and stops a thread, if the testlock attribute is set thread-local.
    See example in test_create_sequential_numbers_race_condition
    """
    if hasattr(pytest_thread_local, "testlock") and pytest_thread_local.testlock:
        if (
            hasattr(pytest_thread_local, "sync_event")
            and pytest_thread_local.sync_event
        ):
            pytest_thread_local.sync_event.set()
        with pytest_thread_local.testlock:
            self.write_original(write_request)
    else:
        self.write_original(write_request)

    Wraps the write of the datastore.adapter and stops a thread, if the testlock attribute is set thread-local.
    See example in test_create_sequential_numbers_race_condition
    
Wraps the write of the datastore.adapter and stops a thread, if the testlock attribute is set thread-local.
See example in test_create_sequential_numbers_race_condition
Wraps the write of the datastore . adapter and stops a thread if the testlock attribute is set thread - local . See example in test_create_sequential_numbers_race_condition
def write(self, write_request: WriteRequest) -> None:  
    if hasattr(pytest_thread_local, "testlock") and pytest_thread_local.testlock:
        if (
            hasattr(pytest_thread_local, "sync_event")
            and pytest_thread_local.sync_event
        ):
            pytest_thread_local.sync_event.set()
        with pytest_thread_local.testlock:
            self.write_original(write_request)
    else:
        self.write_original(write_request)
def write ( self , write_request : WriteRequest ) -> None : if hasattr ( pytest_thread_local , "testlock" ) and pytest_thread_local . testlock : if ( hasattr ( pytest_thread_local , "sync_event" ) and pytest_thread_local . sync_event ) : pytest_thread_local . sync_event . set ( ) with pytest_thread_local . testlock : self . write_original ( write_request ) else : self . write_original ( write_request )
Wraps the write of the datastore.adapter and stops a thread, if the testlock attribute is set thread-local.
Wraps the write of the datastore . adapter and stops a thread if the testlock attribute is set thread - local .
# type: ignore """
    Wraps the write of the datastore.adapter and stops a thread, if the testlock attribute is set thread-local.
    See example in test_create_sequential_numbers_race_condition
    """
self
write_request
WriteRequest