Skip to content

Commit 622d46b

Browse files
committed
Revise changelog
1 parent 06dd108 commit 622d46b

File tree

1 file changed

+88
-78
lines changed

1 file changed

+88
-78
lines changed

doc/changelog/1.7.7.md

Lines changed: 88 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,121 @@
11
# 1.7.7
22

3-
This entire release is focused on `AsyncCallback`.
3+
This entire release is new features around `AsyncCallback`.
44

5-
* `AsyncCallback` instances:
5+
<br>
66

7-
* Added `fork` and `fork_` which run the async computation in the background.
7+
## `AsyncCallback` instances
88

9-
The result of `fork` gives you access to `await: AsyncCallback[A], isComplete: CallbackTo[Boolean]` which you can
10-
use to join back up with it again later.
9+
* Added `.fork` and `.fork_` which run the async computation in the background.
1110

12-
`fork_` on the other hand, returns nothing and is effectively fire-and-forget.
11+
The result of `fork` gives you access to `(await: AsyncCallback[A], isComplete: CallbackTo[Boolean])` which you can
12+
use to join back up with it again later.
1313

14-
* Added duration measuring methods that exist on `Callback`:
14+
`fork_` on the other hand, returns nothing and is effectively fire-and-forget.
1515

16-
```scala
17-
def withDuration[B](f: (A, FiniteDuration) => AsyncCallback[B]): AsyncCallback[B]
18-
def logDuration (fmt: FiniteDuration => String) : AsyncCallback[A]
19-
def logDuration (name: String) : AsyncCallback[A]
20-
def logDuration : AsyncCallback[A]
21-
```
16+
* Added duration measuring methods that exist on `Callback`:
2217

23-
* `AsyncCallback` object:
18+
```scala
19+
def withDuration[B](f: (A, FiniteDuration) => AsyncCallback[B]): AsyncCallback[B]
20+
def logDuration (fmt: FiniteDuration => String) : AsyncCallback[A]
21+
def logDuration (name: String) : AsyncCallback[A]
22+
def logDuration : AsyncCallback[A]
23+
```
2424

25-
* Added `def awaitAll(as: AsyncCallback[_]*): AsyncCallback[Unit]` to wait for a number of async processes to complete.
25+
<br>
2626

27-
* Added `countDownLatch(count: Int)` which returns an `AsyncCallback.CountDownLatch`.
28-
It has the same purpose and semantics as Java's `CountDownLatch`.
27+
## `AsyncCallback` object
2928

30-
```scala
31-
AsyncCallback.CountDownLatch {
32-
countDown : Callback
33-
await : AsyncCallback[Unit]
34-
isComplete: CallbackTo[Boolean]
35-
pending : CallbackTo[Int]
36-
}
37-
```
29+
* Added `def awaitAll(as: AsyncCallback[_]*): AsyncCallback[Unit]` to wait for a number of async processes to complete.
3830

39-
* Added `mutex` which returns a `AsyncCallback.Mutex`:
31+
* Added `.countDownLatch(count: Int)` which returns an `AsyncCallback.CountDownLatch`.
32+
It has the same purpose and semantics as Java's `CountDownLatch`.
4033

41-
```scala
42-
AsyncCallback.Mutex {
43-
/** Wrap a AsyncCallback so that it executes in the mutex.
44-
*
45-
* Note: THIS IS NOT RE-ENTRANT. Calling this from within the mutex will block.
46-
*/
47-
def apply[A](ac: AsyncCallback[A]): AsyncCallback[A]
48-
}
49-
```
34+
```scala
35+
AsyncCallback.CountDownLatch {
36+
val countDown : Callback
37+
val await : AsyncCallback[Unit]
38+
val isComplete: CallbackTo[Boolean]
39+
val pending : CallbackTo[Int]
40+
}
41+
```
5042

51-
* Added `readWriteMutex` which returns a `AsyncCallback.ReadWriteMutex`:
43+
* Added `.mutex` which returns a `AsyncCallback.Mutex`:
5244

53-
```scala
54-
AsyncCallback.ReadWriteMutex {
45+
```scala
46+
AsyncCallback.Mutex {
5547

56-
/** Wrap a AsyncCallback so that it executes in the write-mutex.
57-
* There can only be one writer active at one time.
58-
*
59-
* Note: THIS IS NOT RE-ENTRANT. Calling this from within the read or write mutex will block.
60-
*/
61-
def write[A](ac: AsyncCallback[A]): AsyncCallback[A]
48+
/** Wrap a AsyncCallback so that it executes in the mutex.
49+
*
50+
* Note: THIS IS NOT RE-ENTRANT. Calling this from within the mutex will block.
51+
*/
52+
def apply[A](ac: AsyncCallback[A]): AsyncCallback[A]
53+
}
54+
```
6255

63-
/** Wrap a AsyncCallback so that it executes in the read-mutex.
64-
* There can be many readers active at one time.
65-
*
66-
* Note: Calling this from within the write-mutex will block.
67-
*/
68-
def read[A](ac: AsyncCallback[A]): AsyncCallback[A]
69-
}
70-
```
56+
* Added `.readWriteMutex` which returns a `AsyncCallback.ReadWriteMutex`:
7157

72-
* Added `ref[A](allowStaleReads = false, atomicWrites = true)` which returns a `AsyncCallback.Ref`.
73-
A ref is effectively a "wrapper" for mutable variable. By default, setters and getters are atomic.
58+
```scala
59+
AsyncCallback.ReadWriteMutex {
7460

75-
```scala
76-
AsyncCallback.Ref[A] {
77-
val get : AsyncCallback[A]
78-
val getIfAvailable: CallbackTo[Option[A]]
61+
/** Wrap a AsyncCallback so that it executes in the write-mutex.
62+
* There can only be one writer active at one time.
63+
*
64+
* Note: THIS IS NOT RE-ENTRANT. Calling this from within the read or write mutex will block.
65+
*/
66+
def write[A](ac: AsyncCallback[A]): AsyncCallback[A]
7967

80-
def set (a: => A) : AsyncCallback[Unit]
81-
def setSync (c: CallbackTo[A]) : AsyncCallback[Unit]
82-
def setAsync(c: AsyncCallback[A]): AsyncCallback[Unit]
68+
/** Wrap a AsyncCallback so that it executes in the read-mutex.
69+
* There can be many readers active at one time.
70+
*
71+
* Note: Calling this from within the write-mutex will block.
72+
*/
73+
def read[A](ac: AsyncCallback[A]): AsyncCallback[A]
74+
}
75+
```
8376

84-
def setIfUnset (a: => A) : AsyncCallback[Boolean]
85-
def setIfUnsetSync (c: CallbackTo[A]) : AsyncCallback[Boolean]
86-
def setIfUnsetAsync(c: AsyncCallback[A]): AsyncCallback[Boolean]
87-
}
88-
```
77+
* Added `ref[A](allowStaleReads = false, atomicWrites = true)` which returns a `AsyncCallback.Ref`.
78+
A ref is effectively a "wrapper" for mutable variable. By default, setters and getters are atomic.
8979

90-
* You can now add a `_` suffix to the following to return an `AsyncCallback[Unit]` and be more efficient under-the-hood:
80+
```scala
81+
AsyncCallback.Ref[A] {
82+
val get : AsyncCallback[A]
83+
val getIfAvailable: CallbackTo[Option[A]]
9184

92-
* `traverse`
93-
* `sequence`
94-
* `traverseOption`
95-
* `sequenceOption`
85+
def set (a: => A) : AsyncCallback[Unit]
86+
def setSync (c: CallbackTo[A]) : AsyncCallback[Unit]
87+
def setAsync(c: AsyncCallback[A]): AsyncCallback[Unit]
9688

97-
* The argument to `throwException` is now by-name
89+
def setIfUnset (a: => A) : AsyncCallback[Boolean]
90+
def setIfUnsetSync (c: CallbackTo[A]) : AsyncCallback[Boolean]
91+
def setIfUnsetAsync(c: AsyncCallback[A]): AsyncCallback[Boolean]
92+
}
93+
```
9894

99-
* Added `def throwExceptionWhenDefined(o: => Option[Throwable]): AsyncCallback[Unit]`
95+
* You can now add a `_` suffix to the following to return an `AsyncCallback[Unit]` and be more efficient under-the-hood:
10096

101-
* `AsyncCallback.Barrier`:
97+
* `.traverse`
98+
* `.sequence`
99+
* `.traverseOption`
100+
* `.sequenceOption`
102101

103-
* Added `isComplete: CallbackTo[Boolean]` to synchronously query whether the barrier is complete or not.
102+
* The argument to `.throwException` is now by-name
104103

105-
* Renamed `waitForCompletion` to `await`.
106-
`waitForCompletion` is still available but will result in a deprecation warning.
107-
Automatic migration is below.
104+
* Added `def throwExceptionWhenDefined(o: => Option[Throwable]): AsyncCallback[Unit]`
108105

106+
<br>
107+
108+
## `AsyncCallback.Barrier`
109+
110+
* Added `isComplete: CallbackTo[Boolean]` to synchronously query whether the barrier is complete or not.
111+
112+
* Renamed `waitForCompletion` to `await`.
113+
114+
`waitForCompletion` is still available but will result in a deprecation warning.
115+
Automatic migration is below.
116+
117+
118+
<br>
109119

110120
## Migration
111121

0 commit comments

Comments
 (0)