Categories:
.NET (357)
C (330)
C++ (184)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (2)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What do you understand by Synchronization?
What do you understand by Synchronization?
✍: fyicenter.com
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.
E.g. Synchronizing a function:
public synchronized void Method1 () {
// Appropriate method-related code.
}
E.g. Synchronizing a block of code inside a function:
public myFunction (){
synchronized (this) {
// Synchronized code here.
}
}
2012-05-22, 2809👍, 0💬
Popular Posts:
What Is Paint Shop Pro? - PSP Tutorials - Fading Images to Background Colors with PSP Paint Shop Pro...
Which bit wise operator is suitable for checking whether a particular bit is on or off? The bitwise ...
How To Use "IN OUT" Parameter Properly? - Oracle DBA FAQ - Creating Your Own PL/SQL Procedures and F...
How To Control White Spaces between Table Cells? - XHTML 1.0 Tutorials - Understanding Tables and Ta...
If we have the following in a Java code: String s="abc"; String s2="abc"; Then what will be output o...