Skip to content

Commit a2d2314

Browse files
committed
Experimental warnings
1 parent 4276368 commit a2d2314

File tree

4 files changed

+24
-8
lines changed

4 files changed

+24
-8
lines changed

language-adaptors/rxjava-clojure/src/main/clojure/rx/lang/clojure/blocking.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
(set! *warn-on-reflection* true)
1515

1616
(defmacro ^:private with-ex-unwrap
17+
"The blocking ops wrap errors stuff in RuntimeException because of stupid Java.
18+
This tries to unwrap them so callers get the exceptions they expect."
1719
[& body]
1820
`(try
1921
~@body
@@ -80,7 +82,7 @@
8082
(defn single
8183
"*Blocks* and waits for the first value emitted by the given observable.
8284
83-
An error is thrown if more then one value is produced.
85+
An error is thrown if zero or more then one value is produced.
8486
"
8587
[observable]
8688
(with-ex-unwrap

language-adaptors/rxjava-clojure/src/main/clojure/rx/lang/clojure/chunk.clj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
(set! *warn-on-reflection* true)
77

88
(defn chunk
9-
"Same as rx.Observable.merge(Observable<Observable<T>>) but the input Observables
9+
"EXTREMELY EXPERIMENTAL AND SUBJECT TO CHANGE OR DELETION
10+
11+
TODO RxJava's much bigger since this was written. Is there something built in?
12+
13+
Same as rx.Observable.merge(Observable<Observable<T>>) but the input Observables
1014
are \"chunked\" so that at most chunk-size of them are \"in flight\" at any given
1115
time.
1216
@@ -19,7 +23,7 @@
1923
Example:
2024
2125
(->> users
22-
(map #(-> (GetUserCommand. %) .toObservable))
26+
(rx/map #(-> (GetUserCommand. %) .toObservable))
2327
(chunk 10))
2428
2529
See:

language-adaptors/rxjava-clojure/src/main/clojure/rx/lang/clojure/graph.clj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
(.cache o)))
1919

2020
(defn let-o*
21-
"Given a graph description, returns an observable that emits a single
21+
"EXTREMELY EXPERIMENTAL AND SUBJECT TO CHANGE OR DELETION
22+
23+
Given a graph description, returns an observable that emits a single
2224
map of observables all hooked up and ready for subscription.
2325
2426
A graph is a map from name to a map with keys:
@@ -73,7 +75,9 @@
7375
(assoc ::non-terminals non-terminals))))
7476

7577
(defmacro let-o
76-
"Similar to clojure.core/let, but bindings are Observables and the result of the body
78+
"EXTREMELY EXPERIMENTAL AND SUBJECT TO CHANGE OR DELETION
79+
80+
Similar to clojure.core/let, but bindings are Observables and the result of the body
7781
must be an Observable. Binding names must start with ?. Binding order doesn't matter
7882
and any binding is visible to all other expressions as long as no cycles are produced
7983
in the resulting Observable expression.

language-adaptors/rxjava-clojure/src/main/clojure/rx/lang/clojure/realized.clj

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
:else (->post-proc (rx.Observable/just v))))
3535

3636
(defn realized-map
37-
"See let-realized.
37+
"EXTREMELY EXPERIMENTAL AND SUBJECT TO CHANGE OR DELETION
38+
39+
See let-realized.
3840
3941
Given a map from key to observable, returns an observable that emits a single
4042
map from the same keys to the values emitted by their corresponding observable.
@@ -92,12 +94,16 @@
9294
(.reduce {} (iop/fn* merge))))) ; do the map merge dance
9395

9496
(defn ^rx.Observable realized-map*
95-
"Same as realized-map, but takes a map argument rather than key-value pairs."
97+
"EXTREMELY EXPERIMENTAL AND SUBJECT TO CHANGE OR DELETION
98+
99+
Same as realized-map, but takes a map argument rather than key-value pairs."
96100
[map-description]
97101
(apply realized-map (apply concat map-description)))
98102

99103
(defmacro let-realized
100-
"'let' version of realized map.
104+
"EXTREMELY EXPERIMENTAL AND SUBJECT TO CHANGE OR DELETION
105+
106+
'let' version of realized map.
101107
102108
(let-realized [a (make-observable)]
103109
(* 2 a))

0 commit comments

Comments
 (0)