Skip to content

Document resource instance lifetime more fully once stream garbage collection lands #545

@jberdine

Description

@jberdine
          > I'm working on docs for RESTWrapperOfSkipService and this function seems to be missing compared to the http interface of the service started by runService. But thinking about adding calls in the examples, I'm not sure when this function should be called. Is there an automatic mechanism where e.g. when EventSource.close is called, the close of the connection triggers a delete of the resource instance, or should user code be triggering this explicitly?

Explicit destruction of a live stream is expected to happen in exceptional situations (an example would be having an out-of-band mechanism to detect malicious users, and stop feeding them data immediately). In the general case, a stream will not get destroyed immediately upon disconnection to allow fast reconnect after transient network errors. Instead, it will be garbage collected after some inactivity (Daniel is working on this as Benno mentioned).

Originally posted by @beauby in #542 (comment)

Documentation for runService and SkipServiceBroker should be expanded once garbage collection of streams lands.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions