コード例 #1
0
 /**
  * Free the pool resources that are held by this WriteStream. The pool itself is thread local and
  * will be freed when the thread terminates.
  */
 @Override
 synchronized void shutdown() {
   super.shutdown();
   DeferredSerialization ds = null;
   while ((ds = m_queuedWrites.poll()) != null) {
     ds.cancel();
   }
 }
コード例 #2
0
 public void enqueue(DeferredSerialization ds) {
   if (m_isShutdown) {
     ds.cancel();
     return;
   }
   m_queuedWrites.offer(ds);
 }