Skip to content

lpil/process-waiter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

process_waiter

Package Version Hex Docs

gleam add process_waiter
import gleam/erlang/process
import process_waiter

pub 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 https://hexdocs.pm/process_waiter.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages