5 Commits

Author SHA1 Message Date
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