This is a discussion on what is thread safe in java? within the Java Programming forums, part of the Software Development category; when i read java articales or books i often read thread safe in servlets. what is the meaning for thread ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| when i read java articales or books i often read thread safe in servlets. what is the meaning for thread safe give me a example program for thread safe? |
|
#2
| |||
| |||
| In computer programming, thread-safe describes a program portion or routine that can be called from multiple programming threads without unwanted interaction between the threads. (A thread is an instance of the program running on behalf of some user or process.) Thread safety is of particular importance to Java programmers, since Java is a programming language that provides built-in support for threads. By using thread-safe routines, the risk that one thread will interfere and modify data elements of another thread is eliminated by circumventing potential data race situations with coordinated access to shared data. It is possible to ensure that a routine is thread-safe by: 1. Making sure that concurrent threads use synchronized algorithms that cooperate with each other. 2. Confining the address of a shared object to one thread whenever an unsynchronized algorithm is active..
__________________ cheers Aman |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Safe Use Of Pen Drive | jegan | Computer Hardware | 5 | 12-04-2008 12:02 AM |
| VSS is Virtual Source Safe? | devarajan.v | Software Testing | 1 | 08-17-2007 10:31 PM |
| safe mode | simplesabita | Operating Systems | 1 | 08-11-2007 01:05 AM |
| What is daemon thread and How to create the daemon thread Java? | bluesky | Java Programming | 1 | 07-25-2007 04:55 AM |
| Safe Dropshipping | tripnautic | eCommerce | 0 | 03-20-2007 07:41 PM |
Our Partners |