8000 Better release notes. · socketry/async@75c7ca5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 75c7ca5

Browse files
committed
Better release notes.
1 parent 628f897 commit 75c7ca5

File tree

4 files changed

+54
-9
lines changed

4 files changed

+54
-9
lines changed

bake.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# frozen_string_literal: true
2+
3+
# Released under the MIT License.
4+
# Copyright, 2024, by Samuel Williams.
5+
6+
# Update the project documentation with the new version number.
7+
#
8+
# @parameter version [String] The new version number.
9+
def after_gem_release_version_increment(version)
10+
context['releases:update'].call(version)
11+
context['utopia:project:readme:update'].call
12+
end

gems.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
gem "bake-modernize"
1717

1818
gem "utopia-project"
19+
gem "bake-releases"
1920
end
2021

2122
group :test do

readme.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,23 @@ Please see the [project documentation](https://socketry.github.io/async/) for mo
3131

3232
- [Debugging](https://socketry.github.io/async/guides/debugging/index) - This guide explains how to debug issues with programs that use Async.
3333

34+
## Releases
35+
36+
Please see the [project changes](https://socketry.github.io/async/changes/index) for all releases.
37+
38+
### Next
39+
40+
- [Better Handling of Async and Sync in Nested Fibers](https://socketry.github.io/async/releases/index#better-handling-of-async-and-sync-in-nested-fibers)
41+
42+
## See Also
43+
44+
- [async-http](https://github.com/socketry/async-http) — Asynchronous HTTP client/server.
45+
- [async-websocket](https://github.com/socketry/async-websocket) — Asynchronous client and server websockets.
46+
- [async-dns](https://github.com/socketry/async-dns) — Asynchronous DNS resolver and server.
47+
- [falcon](https://github.com/socketry/falcon) — A rack compatible server built on top of `async-http`.
48+
- [rubydns](https://github.com/ioquatix/rubydns) — An easy to use Ruby DNS server.
49+
- [slack-ruby-bot](https://github.com/slack-ruby/slack-ruby-bot) — A client for making slack bots.
50+
3451
## Contributing
3552

3653
We welcome contributions to this project.
@@ -48,12 +65,3 @@ In order to protect users of this project, we require all contributors to comply
4865
### Community Guidelines
4966

5067
This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
51-
52-
## See Also
53-
54-
- [async-http](https://github.com/socketry/async-http) — Asynchronous HTTP client/server.
55-
- [async-websocket](https://github.com/socketry/async-websocket) — Asynchronous client and server websockets.
56-
- [async-dns](https://github.com/socketry/async-dns) — Asynchronous DNS resolver and server.
57-
- [falcon](https://github.com/socketry/falcon) — A rack compatible server built on top of `async-http`.
58-
- [rubydns](https://github.com/ioquatix/rubydns) — An easy to use Ruby DNS server.
59-
- [slack-ruby-bot](https://github.com/slack-ruby/slack-ruby-bot) — A client for making slack bots.

releases.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Changes
2+
3+
## Next
4+
5+
### Better Handling of Async and Sync in Nested Fibers
6+
7+
Interleaving bare fibers within `Async` and `Sync` blocks should not cause problems, but it presents a number of issues in the current implementation. Tracking the parent-child relationship between tasks, when they are interleaved with bare fibers, is difficult. The current implementation assumes that if there is no parent task, then it should create a new reactor. This is not always the case, as the parent task might not be visible due to nested Fibers. As a result, `Async` will create a new reactor, trying to stop the existing one, causing major internal consistency issues.
8+
9+
I encountered this issue when trying to use `Async` within a streaming response in Rails. The `protocol-rack` [uses a normal fiber to wrap streaming responses](https://github.com/socketry/protocol-rack/blob/cb1ca44e9deadb9369bdb2ea03416556aa927c5c/lib/protocol/rack/body/streaming.rb#L24-L28), and if you try to use `Async` within it, it will create a new reactor, causing the server to lock up.
10+
11+
Ideally, `Async` and `Sync` helpers should work when any `Fiber.scheduler` is defined. Right now, it's unrealistic to expect `Async::Task` to work in any scheduler, but at the very least, the following should work:
12+
13+
```ruby
14+
reactor = Async::Reactor.new # internally calls Fiber.set_scheduler
15+
16+
# This should run in the above reactor, rather than creating a new one.
17+
Async do
18+
puts "Hello World"
19+
end
20+
```
21+
22+
In order to do this, bare `Async` and `Sync` blocks should use `Fiber.scheduler` as a parent if possible.
23+
24+
See <https://github.com/socketry/async/pull/340> for more details.

0 commit comments

Comments
 (0)
0