swift-server / swift-server/async-http-client

Clarify semantics of `shutdown`

Open
#131 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/enhancement
Dominant language
Swift
Stars
1.1k
Forks
156
PR merge metrics
No merged PRs in 30d

Description

We should clarify what the semantics of shutdown are.

I think the following definition could make sense:

When a shutdown signal is received by the client

  • It keeps processing already inflight tasks (following redirect, downloading / uploading, etc ...)
  • It cancels tasks that are waiting to be processed
  • It errors new tasks that are being scheduled after the signal was received
  • Once all tasks have either failed or finished, if it owns the event loop it stops the event loop.

I think at the moment there is no queue of pending tasks, so point two is maybe not relevant yet.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name any files, tests, or entry points. Start by locating the client's shutdown handling and reviewing the existing discussion; done requires an agreed definition of shutdown semantics and documentation that reflects it.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
networking
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.