This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can be deadlock a missing timeout?

 
Maciej Miklas
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchos!
Do I need to care about situations like below:
1. Thread A obtains the lock and does not release it at all
2. Thread B waits forever to obtain the lock, because it was not released by thread A

This is easy to build in the time out, but do I need it? Could be that treated as deadlock?
At least I could easily take care about case 1.

Thanks,
Maciej
 
Lucy Hummel
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Maciej,

If you have a thread like you mentioned below

Originally posted by Maciej Miklas:
Hi ranchos!
Do I need to care about situations like below:
1. Thread A obtains the lock and does not release it at all


then you have a deadlock.

A thread has to release a lock. So that is why you can find a release of a lock in finally blocks.

Br, Lucy
 
Maciej Miklas
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI!
Implementation in my code will release the lock always.
But sun is using automatic testing on Data class. Their software can produce sytuation like that and call it deadlock. The question is, if I have to take care aout this.

Thanks,
Maciej
[ February 25, 2007: Message edited by: Maciej Miklas ]
 
Khaled Mahmoud
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as i know is that this issue belongs to an issue called "Client Crashes".This is issue,as I read through this forum, is out of the scope of the assignment.
Mention it in your choice.txt.
That's what I did.I am still waiting for the results.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic