Happy about Java not suffering from dangling pointers ? Think again the Java5 concurrency utils while very powerful looks like a language flaw:
The following code is an example where a lock cannot be released anymore the thread which holds it is dead. Moreover there is no indication who is holding this lock ...... jstack won't help you......
Oracle please fix it !!!
public class DanglingLock {
static ReadWriteLock l = new ReentrantReadWriteLock();
public static void main(String [] args) throws InterruptedException {
Runnable r = new Runnable() {
public void run() {
l.writeLock().lock();
try {
Thread.sleep(20000);
} catch (InterruptedException ex) {
Logger.getLogger(DanglingLock.class.getName()).log(Level.SEVERE, null, ex);
}
}
};
Thread t = new Thread(r);
t.start();
Thread.sleep(5000);
l.writeLock().lock();
}
}
This blog contains a fine blend of Java and performance, seasoned with a light touch
of software architecture
Sunday, April 25, 2010
Thursday, April 8, 2010
1 gadget per year policy
Well as I am trying to convince myself that I really need an iPad I use the following arguments
- I must try new technology
- I must understand the hype around tablets
and the most absurd argument is that I need a policy for buying gadgets...
The policy is one gadget per year .....
Sounds reasonable no ?
- I must try new technology
- I must understand the hype around tablets
and the most absurd argument is that I need a policy for buying gadgets...
The policy is one gadget per year .....
Sounds reasonable no ?
Sunday, April 4, 2010
I really want an iPad but do I really need it ?
It is cool I fantasize reading books with it viewing movies on the go and browsing the internet in the park....
I am not sure i will continue using it after more than few weeks?
Will I start carrying another device ? not sure.....
I guess that I will continue to hold my breath and wait for Hebrew keyboard, jailbreak and the 3G version....
JDK1.6.0_19 is released
No major news just a few bug fixes...
BTW JDK1.6.0_18 included a new version of the VisualVM which is much more powerful and also includes a sampler..... so I was very anxious to see if 1.6.0_19 includes visualvm1.2.2 but it does not ....
Never mind we can always download it directly from the website....
BTW JDK1.6.0_18 included a new version of the VisualVM which is much more powerful and also includes a sampler..... so I was very anxious to see if 1.6.0_19 includes visualvm1.2.2 but it does not ....
Never mind we can always download it directly from the website....
Subscribe to:
Posts (Atom)