Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lpil/process-waiter
https://github.com/lpil/process-waiter
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/lpil/process-waiter
- Owner: lpil
- Created: 2023-12-30T23:51:49.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-01-02T22:06:05.000Z (11 months ago)
- Last Synced: 2024-05-01T23:05:15.381Z (7 months ago)
- Language: Gleam
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- awesome-gleam - process_waiter - [📚](https://hexdocs.pm/process_waiter/) - Wait for Erlang processes to exit (Packages / Erlang and OTP)
README
# process_waiter
[![Package Version](https://img.shields.io/hexpm/v/process_waiter)](https://hex.pm/packages/process_waiter)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/process_waiter/)```sh
gleam add process_waiter
```
```gleam
import gleam/erlang/process
import process_waiterpub fn main() {
// Start some processes
let pid1 = process.spawn(fn() { process.sleep(500) })
let pid2 = process.spawn(fn() { process.sleep(500) })
let pid3 = process.spawn(fn() { process.sleep(500) })// Wait for them to exit
process_waiter.await_forever([pid1, pid2, pid3])// The processes have now finished
process.is_alive(pid1) // -> False
}
```Documentation can be found at .