11 Commits

Author SHA1 Message Date
carolinacass
fba57a87ad Minor fixes 2023-02-08 15:22:22 +00:00
carolinacass
1fb9fef8ea ServerQuiescingHelper no longer leaking promises
Motivation:
ServerQuiescingHelper leaked promises when promise left scope and not succeeded

Modifications:
Failing promise within a deinit
2023-02-08 14:40:16 +00:00
David Nadoba
d373eaf7db
Replace NIOSendable with Sendable (#181) 2022-10-13 07:43:15 -07:00
David Nadoba
985a485f71
Remove #if compiler(>=5.5) (#182) 2022-10-13 14:04:27 +01:00
Peter Adams
da7c04777b
Docnioextras (#169)
* Improve documentation for NIOExtras

Motivation:

Docs will help users do things correctly.

Modifications:

Add missing comments, improve links.

Result:

Better docc documentation

* Docc in NIOHTTPCompression

* NIOSOCKS docc

* Correct bad symbol

* Minor typo

Co-authored-by: Cory Benfield <lukasa@apple.com>
2022-08-03 01:34:45 -07:00
David Evans
e4dc3c8d1d
Implement Sendable (#160)
Make every non-channel class conform to Sendable (or @unchecked Sendable) to prepare for NIO.
2022-05-04 11:46:21 +01:00
Cory Benfield
d66ae0557e
Clean up imports and dependencies. (#144)
Motivation:

With NIO 2.32.0 we broke the core NIO module up into modules that split
apart the POSIX layer and the core abstractions. As a result, this
package no longer needs to express a hard dependency on the POSIX layer.

Modifications:

- Rewrote imports of NIO to NIOCore.
- Added NIOEmbedded and NIOPosix imports where necessary in tests.
- Extended soundness script to detect NIO imports.
- Note that the main modules still depend on NIO, which is necessary
    for backwards-compatibility reasons. This dependency is unused.

Result:

No need to use NIOPosix.
2021-09-14 16:30:39 +01:00
Fabian Fett
caa96cd4de
Use eventLoop.assertInEventLoop() over assert(eventLoop.inEventLoop) (#111)
Co-authored-by: Cory Benfield <lukasa@apple.com>
2021-01-22 09:04:46 +00:00
Johannes Weiss
5a2fc66068
ServerQuiescingHelper: don't swallow close errors (#54)
Motivation:

ServerQuiescingHelper used to swallow close errors and it shoulnd't do
that.

Modifications:

Don't swallow close errors.

Result:

More correctness.
2019-08-07 18:05:47 +01:00
Johannes Weiss
7b7fcf09be port to NIO 2 (#24)
Motivation:

NIO 2 is the new hot stuff.

Modifications:

port to NIO 2

Result:

newer, shinier
2019-02-26 13:01:48 +00:00
Johannes Weiß
4b14b7f2b1 quiescing helper & demo (#2)
Motivation:

In a few cases quiescing a server application is useful but it's harder
than necessary with core-NIO. Therefore this adds a helper & a
demonstration.

Modifications:

- add `QuiescingHelper` which helps users to quiesce a channel by
  collecting all accepted channels and when needed sends them the
  quiescing user event. When all collected channels have closed the
  user will be notified and can just shut down the ELG.
- added a demo implementation with a simple HTTP server that quiesces
  when receiving a signal

Result:

Make it quite easy to quiesce a server and show users how to do it.
2018-05-17 20:27:15 +02:00