Skip to content

Commit f7e73b9

Browse files
committed
README.md improvements
Improved some documentation to make the library easier to learn and use.
1 parent 983e9e2 commit f7e73b9

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

README.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,8 @@ The above would *Dispatch* the `temperatureEvent` after 4 seconds, via the *Stac
204204

205205
*Scheduled Event Dispatch* is a massive advantage when your use-case requires a fixed or calculated time delay between the composition of an *Event*, and its *Dispatch* for processing.
206206

207-
### Defining an `EventThread`
208-
So, we have an *Event* type, and we are able to *Dispatch* it through a *Queue* or a *Stack*, with whatever *Priority* we desire. Now we need to define an `EventThread` to listen for and process our `TemperatureEvent`s.
209-
210-
**Note:** Code example in this section was updated for Version 2.0.0 due to considerable improvements, which necessitated changing the Interface slightly (for the better)
207+
### (Receiving & Processing Events - Method 1) Defining an `EventThread`
208+
So, we have an *Event* type, and we are able to *Dispatch* it through a *Queue* or a *Stack*, with whatever *Priority* we desire. Now we need a way to Receive our `*`TemperatureEvent`s so that we can do something with them. One way of doing this is to define an `EventThread` to listen for and process our `TemperatureEvent`s.
211209

212210
```swift
213211
class TemperatureProcessor: EventThread {
@@ -368,10 +366,10 @@ Now that we've walked through these basic Usage Examples, see if you can produce
368366
## `UIEventThread`
369367
Version 2.0.0 introduced the `UIEventThread` base class, which operates exactly the same way as `EventThread`, with the notable difference being that your registered *Event* Callbacks will **always** be invoked on the `MainActor` (or "UI Thread"). You can simply inherit from `UIEventThread` instead of `EventThread` whenever it is imperative for one or more *Event* Callbacks to execute on the `MainActor`.
370368

371-
## `EventListener`
372-
Version 3.0.0 introduced the `EventListener` concept to the Library.
369+
## (Receiving & Processing Events - Method 2) `EventListener`
370+
Version 3.0.0 introduced the `EventListener` concept to the Library. These are a universally-available means (available in any `class` you define) of *Receiving Events* dispatched from anywhere in your code, and require *considerably less code* to use.
373371

374-
An `EventListener` is a universal way of subscribing to *Events*, anywhere in your code!
372+
An `EventListener` is a universal way of subscribing to *Events*, anywhere in your code, without having to define and operate within the constraints of an `EventThread`.
375373

376374
By design, `EventDrivenSwift` provides a *Central Event Listener*, which is automatically initialized should any of your code register a *Listener* for an *Event* by reference to the `Eventable` type.
377375

0 commit comments

Comments
 (0)