
Show HN: Go# – go-like concurrency aspects in C# - kpocza
https://github.com/kpocza/GoSharp
======
kpocza
Just a quick note. This is a small library for .NET/C# that implements the
most important concurrency elements of go like channels, selects, timers,
tickers. Don't hesitate to tell your opinion if you have suggestions,
comments, ideas, etc. Thanks.

------
j_s
I need to know if this is something I can use in production.

\- What are recommended minimum C# / CLR versions?

\- Do you plan on implementing first-class support for the full .NET
framework?

I would like to know how much thought you've invested in future direction.

\- Do you have a plan for incorporating the C# 7.2 Span stuff?

[https://news.ycombinator.com/item?id=15731233](https://news.ycombinator.com/item?id=15731233)

~~~
kpocza
There are no specific requirements for the C# version, the library was written
in v7. Go# compiles to three targets: .NET Standard 1.2, .NET Standard 2.0,
and the full .NET Framework 4.5.2+. The same three are available in the NuGet
package published to nuget.org.

There are not so many allocations in the library where Span would help still
it's already quite performant at the moment. If you have any production
feature requests please don't hesitate to file an issue on GitHub or send a
pull request.

~~~
j_s
Thanks! You should flesh out some of this usability info in the README.

------
mrblah
how does this compare to tpl dataflow on performance? is a go channel kinda
like c# bufferblock? are channels thread safe for multiple producers and
multiple consumers writing to and taking from the same queue? i like the code
sample.. very clean.

~~~
kpocza
I haven't compared it to TPL Dataflow however made some pure performance
measurements. The results are at the end of this:
[https://github.com/kpocza/GoSharp/blob/master/src/GoSharp.Pe...](https://github.com/kpocza/GoSharp/blob/master/src/GoSharp.PerfTest/TaskRunner.cs)

Basically Go# can pass millions of messages in a second.

And yes, a Go#/Go channel is similar to something like BufferBlock however
both are designed to fit into different "ecosystem" and way of thinking.

Go# channels are thread safe and have been designed to operate in parallel
environment.

