I'm currently trying out the Questions in the OCP Study Guide,
and I encountered an interesting question, where i "modified"
the Code a little bit.
See it here:
So I just coded a ScheduledExecutorService with a ThreadPool of 5.
Then I wanted tasks to be submitted every Second.
I am also currently explaining the Code to myself,
and I just wanted to know if I get it all right here.
To answer what is going on here, I'd say,
that there might be a deadlock at Runtime,
when one Thread acquires a lock on o1 in the
and another Thread acquires a lock at the same
time on o2 in the ScheduledFuture f2.
This would be a Deadlock, am I right?