Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What Is Synchronization
What do you understand by Synchronization?
✍: FYIcenter
Synchronization is a process of controlling the access of shared resources by the multiple threads in such a manner that only one thread can access one resource at a time. In non synchronized multithreaded application, it is possible for one thread to modify a shared object while another thread is in the process of using or updating the object's value. Synchronization prevents such type of data corruption.
Examples of synchronizing methods or block of codes
public synchronized void myMethod() {
...
}
public yourMethod() {
...
synchronized (this) {
...
}
}
2007-03-03, 5792👍, 0💬
Popular Posts:
When should the method invokeLater() be used? This method is used to ensure that Swing components ar...
What are the standard ways of parsing XML document? XML parser sits in between the XML document and ...
.NET INTERVIEW QUESTIONS - What are Daemon threads and how can a thread be created as Daemon? Daemon...
What are the types of variables x, y, y and u defined in the following code? #define Atype int* type...
If we have the following in a Java code: String s="abc"; String s2="abc"; Then what will be output o...