Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
busterwood authored Nov 14, 2016
1 parent 6719718 commit 2977450
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# BusterWood.Channels
Async CSP-like channels for .NET 4.6 or above.

The `Channel<T>` has the following methods:

* `T Receive()` reads a value from the channel, blocking until a sender has sent a value.
* `Task<T> ReceiveAsync()` reads a value from the channel, the returned task will only complete when a sender has written the value to the channel.
* `bool TryReceive(out T)` attempts to read a value from the channel, returns FALSE is no sender is ready.
* `void Send(T)` writes a value to the channel, blocking until a receiver has got the value.
* `Task SendAsync(T)` writes a value to the channel, the returned task will only complete when a receiver has got the value.
* `bool TrySend(T)` attempts to write a value to the channel, returns FALSE is no receiver is ready.
* `void Close()` prevents any further attempts to send to the channel
* `bool IsClosed` has the channel been closed?

0 comments on commit 2977450

Please sign in to comment.