docs: describe the shutdown deadline, and who owns it per runtime
Closes #18. The three places that still described close() without a timeout — the createapp reference table, the README bullet and the dependency-injection inline comment — now say that in-flight work gets 10 seconds, then a warning and a force-close. Also documents what #18 deliberately deferred, now that #15 has decided it. runtimes.md gains the per-runtime story: app.close() is Node-only, the servers serveDeno()/serveBun() return carry the same close({ timeoutMs }), and edge has nothing to close. Including the row that matters — Node and Bun cut the remainder after the deadline, Deno returns and lets the process end it — since a deadline that means two things is worse than one that admits it. createApp({ shutdownTimeoutMs }) from #19 gets its row in the options table. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
4 files changed
+31
-3
No files matched your search
@@ -53,7 +53,8 @@ const app = createApp({ modules: [ApiModule] });
|
||||
await app.listen(3000);
|
||||
// GET /api/users/9 (header x-token) → { "requested": "9", "you": { "id": "...", "name": "Diego" } }
|
||||
|
||||
await app.close(); // graceful shutdown: drains in-flight requests, closes streams + mesh links
|
||||
await app.close(); // graceful shutdown: drains in-flight, closes streams + mesh links,
|
||||
// then force-closes whatever is left after 10s — app.close({ timeoutMs })
|
||||
```
|
||||
|
||||
## `@Provider` — app-scope, memoized
|
||||
|
||||
Reference in new issue
Block a user