I want to execute a read-only method on an object marked as const, but in order to do this thread-safely, I need to lock a readers-writer mutex:
I have an archive object which manages various byte arrays and hands out InputStreams and OutputStreams for reading and writing them. Each byte array has an associated ReentrantReadWriteLock.
Reading this DZone article about Java concurrency I was wondering if the following code: private volatile List list;
In my destructor I want 开发者_如何学运维to destroy a thread cleanly. My goal is to wait for a thread to finish executing and THEN destroy the thread.
Over the weekend I realized that an application I\'m working on which uses NHibernate as an ORM to a sqlite database has a concurrency issue.
I\'ve been going through the Java Concurrency in Practice book.It is definitively a great reference.I\'m trying to extend the last example of the efficient and scalable result set cache to incorporate
I am writing a web service in Java which needs to handle a large number of requests / second. The general flow will be:
I have dynamic array of hashtables Can I use synchronized for each of them separately? Like s开发者_如何学Pythonynchronized(array[1]) { code .. }, synchronized(array[2]) { code .. }
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this
I\'ve got some code that submits a request to another thread which may or may not submit that request to yet another thread.That yields a return type of Future<Future<T>>.Is there some non