Sha256: 1e00fefe0eb34c9688fed5036b41796d990fc809529cfc78a66687ca486825e7

Contents?: true

Size: 291 Bytes

Versions: 7

Compression:

Stored size: 291 Bytes

Contents

# threads.fy
# Example of threads in fancy

threads = []
10 times: |i| {
  t = Thread new: {
    "Running Thread #" ++ i println
    i times: {
      "." print
      Thread sleep: 1.5 # sleep 1,5 sec
    }
  }
  threads << t
}

"Waiting for all Threads to end..." print
threads each: 'join

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fancy-0.7.0 examples/threads.fy
fancy-0.6.0 examples/threads.fy
fancy-0.5.0 examples/threads.fy
fancy-0.4.0 examples/threads.fy
fancy-0.3.3 examples/threads.fy
fancy-0.3.2 examples/threads.fy
fancy-0.3.1 examples/threads.fy