test_class.declarator: observer
test_class.original_string: Subscriber<String> observer;
test_class.type: Subscriber<String>
test_class.var_name: observer
test_class.file: rxjava/src/test/java/io/reactivex/subscribers/SerializedSubscriberTest.java
test_class.identifier: SerializedSubscriberTest
test_case.body: @Test
      public void testMultiThreadedBasic() {
          TestMultiThreadedObservable onSubscribe = new TestMultiThreadedObservable("one", "two", "three");
          Flowable<String> w = Flowable.unsafeCreate(onSubscribe);
  
          BusySubscriber busySubscriber = new BusySubscriber();
          Subscriber<String> aw = serializedSubscriber(busySubscriber);
  
          w.subscribe(aw);
          onSubscribe.waitToFinish();
  
          assertEquals(3, busySubscriber.onNextCount.get());
          assertFalse(busySubscriber.onError);
          assertTrue(busySubscriber.onComplete);
          // non-deterministic because unsubscribe happens after 'waitToFinish' releases
          // so commenting out for now as this is not a critical thing to test here
          //            verify(s, times(1)).unsubscribe();
  
          // we can have concurrency ...
          assertTrue(onSubscribe.maxConcurrentThreads.get() > 1);
          // ... but the onNext execution should be single threaded
          assertEquals(1, busySubscriber.maxConcurrentThreads.get());
      }
test_case.class_method_signature: SerializedSubscriberTest.testMultiThreadedBasic()
test_case.full_signature: @Test public void testMultiThreadedBasic()
test_case.identifier: testMultiThreadedBasic
test_case.invocations: unsafeCreate serializedSubscriber subscribe waitToFinish assertEquals get assertFalse assertTrue assertTrue get assertEquals get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMultiThreadedBasic()
focal_class.declarator: actual
focal_class.modifier: final
focal_class.original_string: final Subscriber<? super T> actual;
focal_class.type: Subscriber<? super T>
focal_class.var_name: actual
focal_class.declarator: delayError
focal_class.modifier: final
focal_class.original_string: final boolean delayError;
focal_class.type: boolean
focal_class.var_name: delayError
focal_class.declarator: QUEUE_LINK_SIZE = 4
focal_class.modifier: static final
focal_class.original_string: static final int QUEUE_LINK_SIZE = 4;
focal_class.type: int
focal_class.var_name: QUEUE_LINK_SIZE
focal_class.declarator: subscription
focal_class.original_string: Subscription subscription;
focal_class.type: Subscription
focal_class.var_name: subscription
focal_class.declarator: emitting
focal_class.original_string: boolean emitting;
focal_class.type: boolean
focal_class.var_name: emitting
focal_class.declarator: queue
focal_class.original_string: AppendOnlyLinkedArrayList<Object> queue;
focal_class.type: AppendOnlyLinkedArrayList<Object>
focal_class.var_name: queue
focal_class.declarator: done
focal_class.modifier: volatile
focal_class.original_string: volatile boolean done;
focal_class.type: boolean
focal_class.var_name: done
focal_class.file: rxjava/src/main/java/io/reactivex/subscribers/SerializedSubscriber.java
focal_class.identifier: SerializedSubscriber
focal_class.interfaces: implements FlowableSubscriber<T>, Subscription
focal_class.class_method_signature: SerializedSubscriber.SerializedSubscriber(Subscriber<? super T> actual)
focal_class.full_signature: public  SerializedSubscriber(Subscriber<? super T> actual)
focal_class.identifier: SerializedSubscriber
focal_class.modifiers: public
focal_class.parameters: (Subscriber<? super T> actual)
focal_class.signature:  SerializedSubscriber(Subscriber<? super T> actual)
focal_class.class_method_signature: SerializedSubscriber.SerializedSubscriber(Subscriber<? super T> actual, boolean delayError)
focal_class.full_signature: public  SerializedSubscriber(Subscriber<? super T> actual, boolean delayError)
focal_class.identifier: SerializedSubscriber
focal_class.modifiers: public
focal_class.parameters: (Subscriber<? super T> actual, boolean delayError)
focal_class.signature:  SerializedSubscriber(Subscriber<? super T> actual, boolean delayError)
focal_class.class_method_signature: SerializedSubscriber.onSubscribe(Subscription s)
focal_class.full_signature: @Override public void onSubscribe(Subscription s)
focal_class.identifier: onSubscribe
focal_class.modifiers: @Override public
focal_class.parameters: (Subscription s)
focal_class.return: void
focal_class.signature: void onSubscribe(Subscription s)
focal_class.class_method_signature: SerializedSubscriber.onNext(T t)
focal_class.full_signature: @Override public void onNext(T t)
focal_class.identifier: onNext
focal_class.modifiers: @Override public
focal_class.parameters: (T t)
focal_class.return: void
focal_class.signature: void onNext(T t)
focal_class.class_method_signature: SerializedSubscriber.onError(Throwable t)
focal_class.full_signature: @Override public void onError(Throwable t)
focal_class.identifier: onError
focal_class.modifiers: @Override public
focal_class.parameters: (Throwable t)
focal_class.return: void
focal_class.signature: void onError(Throwable t)
focal_class.class_method_signature: SerializedSubscriber.onComplete()
focal_class.full_signature: @Override public void onComplete()
focal_class.identifier: onComplete
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void onComplete()
focal_class.class_method_signature: SerializedSubscriber.emitLoop()
focal_class.full_signature:  void emitLoop()
focal_class.identifier: emitLoop
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void emitLoop()
focal_class.class_method_signature: SerializedSubscriber.request(long n)
focal_class.full_signature: @Override public void request(long n)
focal_class.identifier: request
focal_class.modifiers: @Override public
focal_class.parameters: (long n)
focal_class.return: void
focal_class.signature: void request(long n)
focal_class.class_method_signature: SerializedSubscriber.cancel()
focal_class.full_signature: @Override public void cancel()
focal_class.identifier: cancel
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void cancel()
focal_method.body: public SerializedSubscriber(Subscriber<? super T> actual) {
          this(actual, false);
      }
focal_method.class_method_signature: SerializedSubscriber.SerializedSubscriber(Subscriber<? super T> actual)
focal_method.full_signature: public  SerializedSubscriber(Subscriber<? super T> actual)
focal_method.identifier: SerializedSubscriber
focal_method.modifiers: public
focal_method.parameters: (Subscriber<? super T> actual)
focal_method.signature:  SerializedSubscriber(Subscriber<? super T> actual)