Version 3 of csp (package)

Updated 2015-08-05 12:41:37 by diffuser
What csp
Where https://github.com/securitykiss-com/csp/
Description A Golang-inspired (CSP) concurrency library for Tcl.
Updated 2015-07-29
License MIT

Code example

# From https://securitykiss.com/resources/tutorials/csp_project/csp.html
  proc sender1 {ch} {
        foreach i {1 2 3 4} {
            puts "Sending $i"
            $ch <- $i
        }
        puts "Closing channel"
        $ch close
    }
 
    proc receiver1 {ch} {
        while 1 {
            puts "Receiving [<- $ch]"
        }
    }
 
    # create unbuffered (rendez-vous) channel
    channel ch
    go sender1 $ch
    go receiver1 $ch
 
    vwait forever

Discussion

Full documentation