Skip to content
This repository has been archived by the owner on Dec 13, 2019. It is now read-only.

DistributedLock Issues : Interrupt thread after get lock, CountDownLatch is not reset while lock at the next time #479

Open
1316151417 opened this issue Apr 4, 2019 · 0 comments

Comments

@1316151417
Copy link

Interrupt thread after get lock, CountDownLatch is not reset while lock at the next time

reset CountDownLatch at method prepare(), code :
private synchronized void prepare() { ...... syncPoint = new CountDownLatch(1); }

Interrupt thread after get lock, the field currentNode is null, cleanup will throw NullPointException

Allow it to be null, code :
private void cleanup() { if(currentNode != null) { //delete currentNode.... } ...... }
@1316151417 1316151417 changed the title DistributedLock Issues : Interrupt thread after get lock, CountDownLatch is not initialized while lock at the next time DistributedLock Issues : Interrupt thread after get lock, CountDownLatch is not reset while lock at the next time Apr 4, 2019
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant