Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 264404 Details for
Bug 502132
show monitors do not work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Code to be used for debugging to reproduce the error
file_502132.txt (text/plain), 883 bytes, created by
Manoj N Palat
on 2016-09-26 04:42:19 EDT
(
hide
)
Description:
Code to be used for debugging to reproduce the error
Filename:
MIME Type:
Creator:
Manoj N Palat
Created:
2016-09-26 04:42:19 EDT
Size:
883 bytes
patch
obsolete
>import java.util.concurrent.TimeUnit; > >public class ThreadExample { > > public static void main(String[] args) { > > Node node1 = new Node(); > Node node2 = new Node(); > > node1.setChild(node2); > node2.setChild(node1); > > Thread t1 = new Thread() { > public void run() { > node1.lockMe(3); > } > }; > t1.setName("First Thread:"); > > Thread t2 = new Thread() { > public void run() { > node2.lockMe(0); > } > }; > t2.setName("Second Thread:"); > > t1.start(); > t2.start(); > > > System.out.println("Hello World"); // put a breakpoint here > } >} > >class Node { > Node child; > > public void setChild(Node child) { > this.child = child; > } > synchronized public void lockMe(int seconds) { > try { > TimeUnit.SECONDS.sleep(seconds); > this.child.lockMe(0); > } catch (InterruptedException e) { > e.printStackTrace(); > } > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 502132
: 264404