lundi 23 février 2015

Writing samples for a coroutine library


I am writing a library to run coroutines leveraging the IEnumarator in C#. Is like the approach used by Node.Js and (partially) by Unity: one thread and an internal scheduler that let the various enumerator advance, without the need for locking etc. (here the old version: Node.Cs) Actually i am thinking to write a "simple" sample program to demonstrate the various features:



  • Nested coroutine calls

  • Integration with C# Tasks

  • Message handling between the coroutines

  • How to avoid using locks and waits to...wait for operations completion


I was thinking to make a WebCrawler but i discovered that there is too much code and the example will be too complex. I thought about a simple web server based on HttpListener, but still, i am not able to do something as simple as a sample. Possibly i would not like to make a simple "this are the features" and "use them like this" thing (only) Some idea/suggestion on the approach?


Apologies if the question seems inappropriate. Suggestions, blame & corrections are more than welcome! Thanks!!!





Aucun commentaire:

Enregistrer un commentaire