Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 7 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
## csp - Golang inspired concurrency library for Tcl
# csp - Golang inspired concurrency library for Tcl

The csp package for Tcl is a concurrency library based on Communicating Sequential Processes and provides two primitives namely coroutines and channels which allow concurrent programming in the style of Golang.
The csp package for Tcl is a concurrency library based on Communicating Sequential Processes. It provides two primitives, namely coroutines and channels, which allow concurrent programming in the style of Golang.

The concepts originate in Hoare's Communicating Sequential Processes while the syntax mimics the Golang implementation.
The concepts originate in Hoare's Communicating Sequential Processes, while the syntax mimics the Golang implementation.

The CSP concurrency model may be visualized as a set of independent processes (coroutines) sending and receiving messages to the named channels. The control flow in the coroutines is coordinated at the points of sending and receiving messages i.e. the coroutine may need to wait while trying to send or receive. Since it must work in a single-threaded interpreter, waiting is non-blocking. Instead of blocking a waiting coroutine gives way to other coroutines.
The CSP concurrency model may be visualized as independent processes (coroutines) sending and receiving messages to the named channels. The coroutine's control flow is coordinated at the points of sending and receiving messages, i.e., the coroutine may need to wait while trying to send or receive. Since it must work in a single-threaded interpreter, waiting is non-blocking. Instead of blocking, a waiting coroutine gives way to other coroutines.

This concurrency model may also be seen as a generalization of Unix named pipes where processes and pipes correspond to coroutines and channels.

[Documentation](https://securitykiss.com/resources/tutorials/csp_project/csp.html)

[Intro](https://securitykiss.com/resources/tutorials/csp_project/index.php)

[Documentation] (https://securitykiss.com/resources/tutorials/csp_project/csp.html)






[Intro] (https://securitykiss.com/resources/tutorials/csp_project/index.php)

### Example
## Example

```tcl

Expand Down Expand Up @@ -49,4 +42,3 @@ This concurrency model may also be seen as a generalization of Unix named pipes
vwait forever

```