final Version

main
Obai Albek 2025-05-23 23:34:51 +02:00
parent 4074d08a1c
commit 65f4340099
1 changed files with 6 additions and 3 deletions

View File

@ -113,9 +113,12 @@ public class ThreadsafeSimplifiedList<T>
throw new IndexOutOfBoundsException(index + " out of bounds");
}
ptr.element = element;
ptr.nodeLock.unlock();
return element;
try {
ptr.element = element;
return element;
} finally {
ptr.nodeLock.unlock();
}
}
/**