Skip to content

Commit

Permalink
Merge pull request #40 from biaslab/bartvanerp-patch-2
Browse files Browse the repository at this point in the history
Minor docs fixes
  • Loading branch information
bvdmitri authored Oct 18, 2023
2 parents a4b7c50 + 3f0c079 commit 8aa557c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/src/actors/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ subscribe!(source, MyCustomActor());
## Lambda actor

For debugging purposes it may be convenient to work with a [`LambdaActor`](@ref). This provides an interface that defines callbacks for "next", "error" and "complete" events.
But this generic actor does not allow to dispatch on type of the event.
But this generic actor does not allow to dispatch on the type of the event.

```julia
using Rocket
Expand Down
6 changes: 3 additions & 3 deletions docs/src/observables/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ end

Assume we have a function `foo` and some `observable`:

- Function call `foo(args...)` means __"give me one value synchronously"__ (push strategy)
- In contrast subscription to an `observable` with `subscribe(observable, ...)` means __"notify me about any amount of values, either synchronously or asynchronously"__ (pull strategy)
- Function call `foo(args...)` means __"give me one value synchronously"__ (pull strategy)
- In contrast subscription to an `observable` with `subscribe(observable, ...)` means __"notify me about any amount of values, either synchronously or asynchronously"__ (push strategy)

When a new value is available in an observable we say that the observable __emits__ or __generates__ an update. Values that are generated by an observable are sometimes also called __future__ values, because there is no principled way to predict when an observable will generate a new value. In some programming languages, observables are referred to as __generators__ or __streams__ and we will use all three terms interchangeably.

Expand Down Expand Up @@ -163,7 +163,7 @@ This example shows how subscribe calls are not shared among multiple Actors of t
Subscribing to an Observable is like calling a function, providing callbacks where the data will be delivered to.


`subscribe!` function also supports multiple subscriptions at once. If the input argument to the `subscribe!` function is a tuple or a vector, it will first check that all of the arguments are valid source objects and actors and if its true will subscribe from each of them individually.
The `subscribe!` function also supports multiple subscriptions at once. If the input argument to the `subscribe!` function is a tuple or a vector, it will first check that all of the arguments are valid source objects and actors and if its true will subscribe from each of them individually.

```julia

Expand Down
2 changes: 1 addition & 1 deletion docs/src/operators/about.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [Operators](@id section_operators)

Even though the Observable is the foundation, reactive extensions is mostly useful because of its __operators__. Operators are the essential pieces that allow complex asynchronous code to be easily composed in a declarative manner.
Even though the Observable is the foundation, reactive extensions are mostly useful because of their __operators__. Operators are the essential pieces that allow complex asynchronous code to be easily composed in a declarative manner.

## [What are operators?](@id what_are_operators)

Expand Down
6 changes: 3 additions & 3 deletions docs/src/subjects/about.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# [About subjects](@id section_subjects)

An Rocket.jl Subject is a special type of Observable that allows values to be multicasted to many Actors. While plain Observables are unicast (each subscribed Actor owns an independent execution of the Observable), Subjects are multicast.
A Rocket.jl Subject is a special type of Observable that allows values to be multicasted to many Actors. While plain Observables are unicast (each subscribed Actor owns an independent execution of the Observable), Subjects are multicast.

!!! note
A Subject is like an Observable, but can multicast to many Actors. Subjects are like event emitters: they maintain a registry of many listeners.


Every Subject is an Observable. Given a Subject, you can subscribe to it, providing an Actor, which will start receiving values normally. From the perspective of the Actor, it cannot tell whether the Observable execution is coming from a plain unicast Observable or a Subject.

Internally to the Subject, subscribe does not invoke a new execution that delivers values. Instead, it simply registers the given Actor in a list of Actors.
Internally to the Subject, `subscribe!` does not invoke a new execution that delivers values. Instead, it simply registers the given Actor in a list of Actors.

Every Subject is an Actor itself. It is an object with the methods `next!`, `error!`, and `complete!`. Call `next!(subject, theValue)` to feed a new value to the Subject, and it will be multicasted to the Actors that listen to the Subject.

Expand Down Expand Up @@ -69,7 +69,7 @@ Here, we essentially convert a unicast Observable execution to multicast, throug

## Schedulers

Subject (and some other observables) uses scheduler objects to schedule message delivery to their listeners.
A Subject (and some other observables) uses scheduler objects to schedule message delivery to their listeners.

## Synchronous scheduler

Expand Down
2 changes: 1 addition & 1 deletion docs/src/teardown/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ next!(source, 2) # Logs nothing as a single one actor has unsubscribed
A Subscription essentially just has its own specific method for `unsubscribe!()` function which releases resources or cancel Observable executions. Any Observable has to return a valid `Teardown` object.


`unsubscribe!` function also supports multiple unsubscriptions at once. If the input argument to the `unsubscribe!` function is either a tuple or a vector, it will first check that all of the arguments are valid subscription objects and if its true will unsubscribe from each of them individually.
The `unsubscribe!` function also supports multiple unsubscriptions at once. If the input argument to the `unsubscribe!` function is either a tuple or a vector, it will first check that all of the arguments are valid subscription objects and if this is true it will unsubscribe from each of them individually.

```julia

Expand Down

0 comments on commit 8aa557c

Please sign in to comment.