|
| |
| | Designing for Thread Safety |
 | | Thread safety simply means that the fields of an object or class always maintain a valid state, as observed by other objects and classes, even when used concurrently by multiple threads. |  | | Multiple threads can spell trouble for your object because often, while a method is in the process of executing, the state of your object can be temporarily invalid. |  | | A thread-safe object is one that always maintains a valid state, as observed by other classes and objects, even in a multithreaded environment. |
|
http://www.artima.com/designtechniques/threadsafety.html
(795 words)
|
|
| |
| | Thread-safe fuctions |
 | | A recursive algorithm can be used in a threaded program and have its data protected by a mutex as needed (man 'pthread_mutex_lock()'). |  | | However, if more than one thread is attempting to 'strcat()' to the _same_ string (the same physical location in memory) at the same time, the resultant string would be undefined. |  | | Generally, library functions in a threaded environment act transparently - i.e., you don't have to do anything special to use these functions in a threaded application. |
|
http://www.webservertalk.com/message970445.html
(2336 words)
|
|
| |
| | Developing Thread-Safe Libraries |
 | | In standard multithreaded programs, static-extent data is shared among all threads of a given process, whereas thread local storage is allocated on a per-thread basis such that each thread has its own copy of the data that can be modified by that thread without affecting the value seen by the other threads in the process. |  | | When POSIX Threads Library is present, the bodies of the routines are replaced with more complicated algorithms to optimize their behavior for the multithreaded case. |  | | In the multithreaded case, any other thread attempting to access the environment while the first thread holds the lock is blocked until the first thread performs the unlock operation. |
|
http://helsinki.fi/atk/unix/dec_manuals/DOC_51A/HTML/ARH9VCTE/THRDSCHP.HTM
(2965 words)
|
|
| |
| | Threads and Swing |
 | | The event-dispatching thread is the thread that executes drawing and event-handling code. |  | | Component developers do not have to have an in-depth understanding of threads programming: Toolkits like ViewPoint and Trestle, in which all components must fully support multithreaded access, can be difficult to extend, particularly for developers who are not expert at threads programming. |  | | This is particularly true in Java where one program can run on many different types of machines and OS platforms, and where each program must work under both preemptive or non-preemptive scheduling. |
|
http://java.sun.com/products/jfc/tsc/articles/threads/threads1.html
(1967 words)
|
|
| |
| | Thread-safe webapps using Spring |
 | | When the execution of thread B continues afterwards a new object variable will be created on line 5 and the memory address held by the reference that has already been returned by the method will be overwritten with a new memory address. |  | | Consider the case where pi is null and threads A and B enter the method and simultaneously execute line 4. |  | | Next, consider thread A continues execution, returns the reference to the memory address that contains a object variable that contains the result of 22 divided by 7 and exits the method while thread B is suspended by the VM for some reason. |
|
http://www.javalobby.com/articles/thread-safe/index.jsp
(2664 words)
|
|
| |
| | Thread-safe |
 | | The requirement for thread-safety highlights the inherent tension in multi-threaded programming: the need for multiple threads to access the same shared data, and the need for a shared piece of data to be accessed by only one thread at any given time. |  | | Manufactures thread plug gages and thread engineering software. |  | | White paper describes actual implementation of thread library for which requirements are spelled out in a prior document. |
|
http://www.omniknow.com/common/wiki.php?in=en&term=Thread_safe
(1528 words)
|
|
| |
| | thread-safe Kerberos libraries |
 | | But at the same time, the GSS and krb5 thread hooks shouldn't have compiled-in knowledge of, for example, how many locks are needed by the other library or what thread package support was compiled in. |  | | This can be extended to deal with dynamically loaded objects, though they'd probably all have to be loaded just to give an answer for gss_num_locks if the info isn't cached in a config file or something.... |  | | Actually, I was thinking that every library would have to be using the same thread interface through callbacks. |
|
http://mailman.mit.edu/pipermail/krbdev/2002/000145.html
(1493 words)
|
|
| |
| | [No title] |
 | | This is possible because of the way in which threads are scheduled by the underlying operating system. |  | | The lack of thread safety isn't a problem in many design scenarios if you can assume that a Point object will never be accessed concurrently by two or more threads. |  | | However, in some scenarios that involve multithreaded programming techniques it would be possible for code running on two or more threads to access a Point object and attempt to update and read its data at the same time. |
|
http://msdn.microsoft.com/msdnmag/issues/04/09/BasicInstincts
(2831 words)
|
|
| |
| | Technical Note TN2125: Thread-safe programming in QuickTime |
 | | However, it may not be safe for one of these threads to be writing to the movie file while the other thread is reading from it without some locking. |  | | The threads manipulating these objects are required to perform their own synchronization (or locking) around any object access. |  | | Now consider moving this operation from the main thread (the user interface blocking thread) to a background thread, or even a number of background threads. |
|
http://developer.apple.com/technotes/tn/tn2125.html
(4595 words)
|
|
| |
| | Chapter 4. Thread-Safe MPI |
 | | The exception handler can be executed by a thread that is distinct from the thread that will return the error code. |  | | Matching collective calls on a communicator, window, or file handle is performed according to the order in which the calls are issued in each process. |  | | In a multithreaded environment, it is the user's responsibility to use suitable mutual exclusion logic to enforce this condition. |
|
http://www.ac3.edu.au/SGI_Developer/books/MPT_MPI_PM/sgi_html/ch04.html
(727 words)
|
|
| |
| | Write thread-safe servlets |
 | | Remember, only one place in memory is allocated for this variable, and it is shared between all threads that intend on executing this same class instance. |  | | Your servlet and JavaServer Pages code is subject to thread safety issues due to the way your servlet container uses it. |  | | I have always said that the best way to fix problems is to avoid them all together; in our case, this approach is best. |
|
http://www.javaworld.com/javaworld/jw-07-2004/jw-0712-threadsafe_p.html
(2287 words)
|
|
| |
| | thread safe code : Java Glossary |
 | | Instead of modifying fields in an object, and risking it being in an indeterminate state, you create a new object, and then replace the object as a whole with the new one is one atomic operation, setting a new reference. |  | | For a synchronized instance method, the synchronized code can be run by other Thread on other objects simultaneously, since the locking is on the object. |  | | Thread-safe code is code that will work even if many Threads are executing it simultaneously. |
|
http://mindprod.com/jgloss/threadsafe.html
(1879 words)
|
|
| |
| | Thread Safe Streams |
 | | method attempts to synchronize on the input and output streams to "not allow other threads to read from the input or write to the output while copying is taking place". |  | | You're trying to write a library routine to be used by many different programmers in their own programs so you can't count on the rest of the program outside this utility class being written in a thread safe fashion. |  | | Wrapping the unsynchronized classes in a synchronized class is insufficient because the underlying unsynchronized class may still be exposed to other classes and threads. |
|
http://www.ibiblio.org/javafaq/questions/06031999.html
(3220 words)
|
|
| |
| | Thread-safe Types and Methods |
 | | To guarantee the thread safety of the ArrayList, all operations must be done through the wrapper returned by the Synchronized method. |  | | While you only occasionally need to make a decision about whether or not to use multiple threads, every time you design a type you need to consider what its thread safety model is going to be. |  | | - having one value per instance and per thread rarely makes sense, and indeed the simplest way of using thread-local storage is with |
|
http://www.yoda.arachsys.com/csharp/threads/threadsafe.shtml
(726 words)
|
|
| |
| | Java Forums - thread safe servlets |
 | | If it's operating on data that could be shared by other threads (such as other requests for the same servlet) then it might be not thread-safe. |  | | Synchronization forces a thread to flush its local cache and get the most recent value from main memory. |  | | > data members are immutable, you're inherently thread |
|
http://forum.java.sun.com/thread.jspa?threadID=590476&messageID=3071849
(750 words)
|
|
| |
| | Apache 2.0 Thread Safety Issues - Apache HTTP Server |
 | | There are times when you actually want something to affect all threads, but generally you need to avoid using them if you want your code to be thread safe. |  | | This is a common global variable that holds the error number of the last error that occurred. |  | | c-client's static data is meant to be shared across threads. |
|
http://httpd.apache.org/docs-2.0/developer/thread_safety.html
(736 words)
|
|
| |
| | The Old New Thing : C++ scoped static initialization is not thread-safe, on purpose! |
 | | Provided no threads are spawned prior to the start of the main program the problem is solved. |  | | But since this happens before any other threads are created, you've guaranteed that subsequent calls cannoy have any of the problems you describe in your article. |  | | If the thread gets pre-empted between the load and the store, the value stored may no longer agree with the value being overwritten. |
|
http://weblogs.asp.net/oldnewthing/archive/2004/03/08/85901.aspx
(5215 words)
|
|
| |
| | Thread-safe MPI |
 | | In the end, whether these implementations are effective (i.e., solve user problems) will be determined by details of thread scheduling and MPI polling policies. |  | | In both implementations, users will specify at link time which version (regular or thread-safe) of the library to use. |  | | However, in the Sun implementation, the user must make sure there are enough lightweight processes (LWPs). |
|
http://www.netlib.org/utk/mpi-review/node59.html
(297 words)
|
|
| |
| | Thread-safe |
 | | Instead of hardening the collection classes, though, it is likely much easier to add a Monitor to the class vars of class object and use that to protect critical regions. |  | | Personally I think this is the "right way" to do it, no need to add complexity and overhead unless you know you need it. |  | | If another squeak thread (NOT native thread) interrupts this operation, isn't there a possibility for bad things to happen? |
|
http://minnow.cc.gatech.edu/squeak/543
(838 words)
|
|
| |
| | dBforums - thread safe? |
 | | But if it _would_ be moved to a theareded environment and threads |  | | Only, if your program is supposed to use threads. |  | | But if it _would_ be moved to a theareded environment and threads would |
|
http://www.dbforums.com/t496952.html
(889 words)
|
|
| |
| | [No title] |
 | | The first version simply checks whether the calling thread can gain ownership of the object's SyncBlock and returns true if it is successful. |  | | Then, the framework class library provides methods that, when you pass in a reference to an object, use that data structure for thread synchronization purposes. |  | | Specifically, I'm going to explain the motivation for why SyncBlocks and Monitors were designed the way they are and how they work. |
|
http://msdn.microsoft.com/msdnmag/issues/03/01/NET
(2879 words)
|
|
| |
| | Making LessTif thread-safe |
 | | Threads are a level lower than processes : threads are independent but they do share data - all threads in the same process run with the same memory space. |  | | Once you know that, it's easy to figure out that all accesses to data (anything in the thread's memory really) need to be watched carefully, because any of the other processes can be accessing the same data at the same time. |  | | Unsafe functions by design include ctime, getpwuid, readdir. |
|
http://www.lesstif.org/thread.html
(522 words)
|
|
| |
| | How thread-safe is mysql_real_connect()? |
 | | thread safe, you do not need to perform any locking of your own to make |  | | > thread safe, you do not need to perform any locking of your own to make |
|
http://www.nabble.com/How-thread-safe-is-mysql_real_connect()--t385455.html
(3919 words)
|
|
| |
| | thread-safe - a Whatis.com definition |
 | | Confining the address of a shared object to one thread whenever an unsynchronized algorithm is active. |  | | 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. |
|
http://whatis.techtarget.com/definition/0,,sid9_gci331590,00.html
(202 words)
|
|
| |
| | Programming: Can an object for a Struts Action be made thread safe? |
 | | find a way to make things thread safe if you're doing them in an Action, since |  | | objects, or more specifically the object's methods, that do I/O thread |  | | > objects, or more specifically the object's methods, that do I/O thread |
|
http://www.codecomments.com/printthread.php?threadid=438101
(507 words)
|
|
| |
| | Synchronizing Threads |
 | | For example, imagine an application in which one thread (the producer) writes data to a file while a second thread (the consumer) reads data from the same file. |  | | Lesson: Threads: Doing Two or More Tasks At Once |  | | In one such set of programming situations, called producer-consumer scenarios, the producer generates a stream of data that a consumer uses. |
|
http://java.sun.com/docs/books/tutorial/essential/threads/multithreaded.html
(243 words)
|
|
| |
| | Thread-safe design (4/20/99) |
 | | Thread-safe programming is only necessary if you have data that can be modified by more than one thread at a time. |  | | is the hardest problem to solve in any threaded program." |  | | The way around this is for the server design to use |
|
http://www.javaworld.com/javaworld/javaqa/1999-04/01-threadsafe.html
(787 words)
|
|
| |
| | jGuru: How do I ensure that my servlet is thread-safe? |
 | | In essence, if the servlet implements this interface, the servlet will be thread safe.andamp;quot; Note that this is not an ideal solution, since performance may suffer (depending on the size of the instance pool), plus it's more difficult to share data across instances than within a single instance. |  | | To put it the other way, do I need to synchronize access to these objects (HttpServletRequest and HttpServletResponse)? |  | | The thread pool size is determined by the engine; there should be a config parameter. |
|
http://www.jguru.com/faq/view.jsp?EID=150
(1251 words)
|
|
| |
| | tcl module thread safe? |
 | | The problem is that it's very hard to ensure that every possible situation will be thread safe. |  | | If you have any doubt on some particular function (or better, tests cases that fails !) just tell me. |
|
http://www.wzdftpd.net/smf/index.php?topic=145.msg390
(94 words)
|
|
| |
| | Is Interclient thread safe? |
 | | So if two threads are trying to write to the same data, or perform an interbase query, they'll be serialized. |  | | The InterBase client library is currently not multi-threaded so you will not see a huge performance increase by using multiple threads in your InterClient application. |  | | Solution: The information in this article applies to: * InterBase v4.x * InterBase v5.x * InterClient v1.x Interclient is thread-safe, meaning that a threaded application can safely use the interclient library. |
|
http://community.borland.com/article/0,1410,25654,0.html
(110 words)
|
|
| |
| | libcurl - a thread safe transfer library |
 | | Some operating systems that are known to have solid and working thread support are Linux, Solaris and Windows. |  | | Some operating systems are known to have faulty thread implementations. |  | | libcurl is designed and implemented entirely thread safe. |
|
http://curl.haxx.se/libcurl/threadsafe.html
(207 words)
|
|
| |
| | Smart Pointer Thread Safety |
 | | That means that you must implement your own protocol for using this object. |  | | The other way to get into trouble is to have a smart pointer that is read by one thread and written to by another. |  | | If you have a thread writing to a native pointer while another one writes to it, it is easy to read a corrupt value.) |
|
http://www.jelovic.com/articles/smart_pointer_thread_safety.htm
(438 words)
|
|
| |
| | Comp.compilers: Re: Thread safe lexical scanner generator |
 | | % program (for example, two thread lexical scanning at the same time)? |  | | Re: Thread safe lexical scanner generator ptjm@interlog.com (1998-04-15) |  | | I believe that the current version of flex has an option to generate |
|
http://compilers.iecc.com/comparch/article/98-04-059
(99 words)
|
|
| |
| | thread-safe from FOLDOC |
 | | Nearby terms: threaded code « threading « Thread Language Zero « thread-safe » three-finger salute » three-letter acronym » three-tier |
|
http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?threads
(41 words)
|
|
| |
| | Re: Is Heimdal thread safe? |
 | | Unfortunately the C bindings for GSS-API are not really thread safe in the first place, so making a thread safe library without a global lock would not be easy. |  | | There are, however, few global variables and such, so it wouldn't be very hard to add locks where necessary. |  | | It would probably be possible to have several threads sharing one context (but with separate auth_contexts). |
|
http://www.stacken.kth.se/lists/heimdal-discuss/000-old/msg00315.html
(192 words)
|
|
| |
| | PHP Bugs: #14447: Thread Safe |
 | | Date and Time functions time function is not thread safe Mabe be a new node in the manual like the "Function Reference" node. |  | | there has been a EXPERMINAL file as the flag for experminal status so why not give a THREAD_SAFE file to indicate this module is thread safe for all its functions it's a simple and quick solution but can't tell exactly which function is and is not thread safe, only the whole module is marked |  | | Will be nice if the documentation will list for each function category all the functions that are thread safe or not. |
|
http://bugs.php.net/?id=14447&edit=1
(204 words)
|
|
| |
| | thread-safe strings |
 | | I've looked over the code for basic_string a bit and see that there is a problem with _M_state being accessed from multiple threads. |  | | Also, how can I verify that string is thread-safe after mucking around with it? |  | | [Date Index] [Subject Index] [Author Index] [Thread Index] |
|
http://gcc.gnu.org/ml/libstdc++/2000-q1/msg00325.html
(114 words)
|
|
| |
| | Thread Safe HDF5 |
 | | A "thread-safe" version of HDF5 is one that can be called from any thread of a multi-threaded program. |  | | Any calls to HDF5 can be made in any order, and each individual HDF5 call will perform correctly. |  | | Please send any comments or suggestions to hdfhelp@ncsa.uiuc.edu. |
|
http://hdf.ncsa.uiuc.edu/HDF5/papers/features/mthdf
(178 words)
|
|
| |
| | mysqli_thread_safe |
 | | mysqli_thread_safe -- Returns whether thread safety is given or not |
|
http://php.s3.to/man/function.mysqli-thread-safe.html
(19 words)
|
|
| |
| | LWP Thread safe? |
 | | Programming > Perl Libwww > LWP Thread safe... |  | | I've got a threaded perl application that uses LWP::UA to monitor web servers. |  | | It fires off 10 check threads (which really is necessary to complete in a timely manner), and we're seeing segfaults. |
|
http://www.talkaboutprogramming.com/group/perl.libwww/messages/1546.html
(106 words)
|
|
| |
| | which is thread safe ? |
 | | Well while not implementing which is thread safe. |  | | So my final answer would be 2 and 3 are thread safe. |  | | 3) I would say 3 is safe because there is no setInitParameter so in theory this is the same while the server is running |
|
http://saloon.javaranch.com/18/000837.html
(176 words)
|
|
| |
| | maxdb_thread_safe |
 | | maxdb_thread_safe -- Returns whether thread safety is given or not |
|
http://www.ximatix.com/docs/php/function.maxdb-thread-safe.html
(27 words)
|
|
| |
| | ASPN : Python Cookbook : Thread-safe caching object with file and HTTP implementations |
 | | Use the 'entry' parameter to store meta-data if required. |  | | # -*- coding: iso-8859-1 -*- from threading import Lock from os import fstat from time import time, strptime from calendar import timegm import urllib2 import re import weakref import new NOT_INITIALIZED = object() class Entry(object): """ A cache entry, mostly an internal object. |  | | Don't worry about multiple threads accessing the same name, as this method is properly isolated. |
|
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/302997
(1270 words)
|
|
| |
| | Re: is velocity thread safe? |
 | | it is *not* thread safe - just use one per rendering request. |  | | I had tried to look in the docs and found nothing on the subject, so I guess (hope) this is the place to find the answer. |  | | The only place to watch out is when using a VelocityContext. |
|
http://www.mail-archive.com/velocity-dev@jakarta.apache.org/msg10060.html
(154 words)
|
|
| |
| | RE: Where those thread-safe Xlivbs ??? |
 | | On 27-May-97 opitz@informatik.uni-frankfurt.de wrote: >Hi, > >where are those thread safe Xlibs available ? |  | | Prev by thread: Where those thread-safe Xlivbs ??? |  | | Next by thread: RE: Where those thread-safe Xlivbs ??? |
|
http://mail.nl.linux.org/mnemonic-dev/1997-05/msg00145.html
(126 words)
|
|
| |
| | How to judfe if a class need thread safe? (Legacy Design Forum) |
 | | Receive $75 off when you register with code ART |  | | How to judfe if a class need thread safe? |  | | This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. |
|
http://www.artima.com/legacy/design/threadsafety/messages/29.html
(162 words)
|
|
| |
| | dBforums - Urllib thread safe? |
 | | Since your mail reader does not understand this |  | | I would be very worried to share the instance between threads. |  | | It's safe as long as you don't share instances between threads. |
|
http://www.dbforums.com/t398108.html
(381 words)
|
|
| |
| | JavaRanch Big Moose Saloon: Thread safe servlets |
 | | Can anybody help me with figuring out which of the following attribute scopes are thread safe in case the servlet implements the SingleThreadModel interface as well as in case it does not |  | | context attributes - never thread safe (the servlet context is shared across all instances of the servlet) |  | | JavaRanch Big Moose Saloon » Professional Certification » Web Component Certification (SCWCD) » Thread safe servlets |
|
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=next_topic&f=18&t=000102&go=newer
(144 words)
|
|
| |
| | Bookmarks |
 | | jGuru: Please explain why Swing is not thread safe and AWT is. |
|
http://www.derepas.com/fabrice/bookmarks.html
(285 words)
|
|
|