David Karnok
David Karnok
This issue, similar to #21, collects some interesting cases and pitfalls in the form of Java Puzzlers, giving a scenario and offering 4-6 answers.
Hi. I couldn't find an array-based yet unbounded single-producer multiple-consumer queue in JCTools. Is there (supposed to be) one? I've created a variant but I'm not sure the `poll` logic...
Signature: ```java ParallelTransformer transformRail(BiFunction
``` hu.akarnokd.kotlin.flow.ReplaySubjectSizeAndTimeBoundTest > cancelledOneCollectorSecondCompletes FAILED java.lang.AssertionError: expected: but was: at org.junit.Assert.fail(Assert.java:89) at org.junit.Assert.failNotEquals(Assert.java:835) at org.junit.Assert.assertEquals(Assert.java:120) at kotlin.test.junit.JUnitAsserter.assertEquals(JUnitSupport.kt:32) at kotlin.test.AssertionsKt__AssertionsKt.assertEquals(Assertions.kt:57) at kotlin.test.AssertionsKt.assertEquals(Unknown Source) at kotlin.test.AssertionsKt__AssertionsKt.assertEquals$default(Assertions.kt:56) at kotlin.test.AssertionsKt.assertEquals$default(Unknown Source) at hu.akarnokd.kotlin.flow.ReplaySubjectSizeAndTimeBoundTest$cancelledOneCollectorSecondCompletes$1$1.invokeSuspend(ReplaySubjectSizeAndTimeBoundTest.kt:520) at...
In the `MapPublisher` operator, the [comment](https://github.com/apple/servicetalk/blob/master/servicetalk-concurrent-api/src/main/java/io/servicetalk/concurrent/api/MapPublisher.java#L58) indicates that the caller of `onNext` is responsible for handling crashes. However, the `ReactiveStreamsAdapter` [calls the servicetalk's](https://github.com/apple/servicetalk/blob/master/servicetalk-concurrent-reactivestreams/src/main/java/io/servicetalk/concurrent/reactivestreams/ReactiveStreamsAdapters.java#L185) `Publisher.Subscriber.onNext` without protection. If I understand correctly,...
If a planet doesn't have enough workers, the AI disables buildings to save on workforce. In this case, the available power may become too large and the AI demolishes one...
I took the challenge: ### `listOnly3rdAnd4thCountry` Lists are 0 based thus the 3rd item is at index 2 yet the matching test expects index 3 and 4. ### `getCurrencyUsdIfNotFound` The...
Hi. I took on the [challenge](https://stackoverflow.com/q/49412101/61158) of writing a bridge that turns `String`s in a `Flowable` into bytes readable via the Java `InputStream` API (blockingly): - [FlowableStringInputStream.java](https://github.com/akarnokd/akarnokd-misc/blob/master/src/main/java/hu/akarnokd/rxjava2/FlowableStringInputStream.java) - [FlowableStringInputStreamTest.java](https://github.com/akarnokd/akarnokd-misc/blob/master/src/test/java/hu/akarnokd/rxjava2/FlowableStringInputStreamTest.java) Since...
I don't know if these supposed to exist or just were linked early: `https://raw.githubusercontent.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.toCompletable.png` `https://raw.githubusercontent.com/wiki/ReactiveX/RxJava/images/rx-operators/create-sync.png` `https://raw.githubusercontent.com/wiki/ReactiveX/RxJava/images/rx-operators/create-async.png`
Currently I have to switch the view between the two modes; it would be great they could be in the same table (i.e., another view option to have them both),...