alpacahq / alpaca-ts

A TypeScript Node.js library for the https://alpaca.markets REST API and WebSocket streams.
ISC License
154 stars 42 forks source link

Feature/safe close #1

Closed KalebMills closed 4 years ago

KalebMills commented 4 years ago

As I began using this API, I found no way to guarantee an operation completed in the event of SIGTERM, or SIGKILL. This PR adds the ability to methods that effect resources to be tracked via this._pendingProcesses. If a user of this API needs to close the current Node process rapidly, we can now guarantee operations performed on resources are completed.

117 commented 4 years ago

Nice!