Skip to content

Instantly share code, notes, and snippets.

# Run progress: 0,00% complete, ETA 00:01:00
# VM invoker: C:\Program Files\Java\jdk1.7.0_55\jre\bin\java.exe
# VM options: -Xmx1300m -Dfile.encoding=windows-1250
# Fork: 1 of 1
# Warmup: 5 iterations, 1 s each
# Measurement: 5 iterations, 1 s each
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark: rx.schedulers.ComputationSchedulerPerf.observeOn
# Parameters: (size = 1)
# Run progress: 0,00% complete, ETA 00:01:00
# VM invoker: C:\Program Files\Java\jdk1.7.0_55\jre\bin\java.exe
# VM options: -Xmx3072m -Dfile.encoding=windows-1250
# Fork: 1 of 1
# Warmup: 5 iterations, 1 s each
# Measurement: 5 iterations, 1 s each
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark: rx.schedulers.ComputationSchedulerPerf.observeOn
# Parameters: (size = 1)
/**
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/**
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/**
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/**
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/**
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
import java.util.Arrays;
import java.util.List;
import javax.xml.ws.Response;
import rx.Observable;
import rx.subjects.BehaviorSubject;
public final class Demo {
interface Response {
/**
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@akarnokd
akarnokd / AtomicArrayQueueUnsafe.java
Last active August 29, 2015 14:10
Resizable concurrent Array Queue implementation
package rx.internal.util.unsafe;
import java.util.*;
/**
* A single-producer single-consumer circular array with resize capability.
* The methods size(), isEmpty(), peek(), poll() need to be called from the consumer thread whereas
* offer() needs to be called from the producer thread only.
*/
public class AtomicArrayQueueUnsafe extends AbstractQueue<Object> {