tactors.nim 190 B

1234567891011121314
  1. discard """
  2. outputsub: "150"
  3. """
  4. import actors
  5. var
  6. pool: ActorPool[int, void]
  7. createActorPool(pool)
  8. for i in 0 ..< 300:
  9. pool.spawn(i, proc (x: int) {.thread.} = echo x)
  10. pool.join()