You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Allow timeout (when the observable ends, caller will
359
-
// cancel the agent, so we need timeout to allow cancellation)
360
-
let!msg= mbox.TryReceive(200)
361
-
match msg with
362
-
| Some(Put _)| None ->
363
-
()// Ignore put or no message
364
-
| Some(Get repl)->
365
-
// Reader is blocked, so next will be Put
366
-
// (caller will not stop the agent at this point,
367
-
// so timeout is not necessary)
368
-
let!v= mbox.Receive()
369
-
match v with
370
-
| Put v -> repl.Reply(v)
371
-
|_-> failwith "Unexpected Get"})
372
-
373
-
[<System.Obsolete("Use AsyncSeq.ofObservableDiscarding or AsyncSeq.ofObservableBuffered. This function doesn't guarantee that the asynchronous sequence will return all values produced by the observable")>]
374
-
letofObservable(input :System.IObservable<_>)=
375
-
ofObservableDiscarding input
333
+
[<System.Obsolete("Please use AsyncSeq.ofObservableBuffered. The original AsyncSeq.ofObservable doesn't guarantee that the asynchronous sequence will return all values produced by the observable",true) >]
334
+
letofObservable(input :System.IObservable<'T>):AsyncSeq<'T>= failwith "no longer supported"
Copy file name to clipboardExpand all lines: src/FSharp.Control.AsyncSeq/AsyncSeq.fsi
+1-7Lines changed: 1 addition & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -181,13 +181,7 @@ module AsyncSeq =
181
181
/// an unbounded buffer and are returned as next elements of the async sequence.
182
182
val ofObservableBuffered : input:System.IObservable<'T>-> AsyncSeq<'T>
183
183
184
-
/// Converts observable to an asynchronous sequence. Values that are produced
185
-
/// by the observable while the asynchronous sequence is blocked are discarded
186
-
///(this function doesn't guarantee that asynchronou ssequence will return
187
-
/// all values produced by the observable)
188
-
val ofObservableDiscarding : input:System.IObservable<'T>-> AsyncSeq<'T>
189
-
190
-
[<System.Obsolete("Use AsyncSeq.ofObservableDiscarding or AsyncSeq.ofObservableBuffered. This function doesn't guarantee that the asynchronous sequence will return all values produced by the observable")>]
184
+
[<System.Obsolete("Please use AsyncSeq.ofObservableBuffered. The original AsyncSeq.ofObservable doesn't guarantee that the asynchronous sequence will return all values produced by the observable",true)>]
191
185
val ofObservable : input:System.IObservable<'T>-> AsyncSeq<'T>
192
186
193
187
/// Converts asynchronous sequence to an IObservable<_>. When the client subscribes
0 commit comments