Skip to content

TechXcel.com - provides technical excellence...

Narrow screen resolution Wide screen resolution Increase font size Decrease font size Default font size default color orange color green color
You are here: Home arrow Tech FAQ arrow Java arrow What do you understand by Synchronization
What do you understand by Synchronization PDF Print E-mail
(0 votes)
Written by Mukesh Ranjan   
Monday, 14 May 2007

What do you understand by Synchronization

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.
}
}

More info

For more java related stuff visit Mukesh Ranjans site here

Comments (0)Add Comment

Write comment
You must be logged in to a comment. Please register if you do not have an account yet.

Copyright 2007. All Rights Reserved.
busy




Reddit!Del.icio.us!Google!Live!Facebook!Slashdot!Netscape!Technorati!StumbleUpon!Spurl!Wists!Simpy!Newsvine!Blinklist!Furl!Fark!Blogmarks!Yahoo!Smarking!Netvouz!Shadows!
RawSugar!Ma.gnolia!PlugIM!Squidoo!BlogMemes!FeedMeLinks!BlinkBits!Tailrank!linkaGoGo!
 

Who's Online

User Login

PayPal Donation

Enter Amount:

Syndicate

TechXcel's Friends

Tutorials Garden
Wicolorz
pixel2life

Text Link Add

Statistics

Members: 271
News: 60
Web Links: 6
Visitors: 300980

Google Seach

Google AdSense

TechXcel Referrals

TechXcel's Sponcer...