Skip to main content
10 events
when toggle format what by license comment
Jun 16, 2020 at 10:01 history edited CommunityBot
Commonmark migration
Dec 9, 2018 at 7:30 comment added Luaan @MatthieuM. C# doesn't have have one application thread per one OS thread and never did. This is very obvious when you're interacting with native code, and especially obvious when running in MS SQL. And of course, cooperative routines were always possible (and are even simpler with async); indeed, it was a pretty common pattern for building responsive UI. Was it as pretty as Erlang? Nope. But that's still a far cry from C :)
Dec 7, 2018 at 21:53 comment added jrh This is somewhat related but I also think this "function color" idea also applies to functions that block on input from the user, e.g., modal dialog boxes, message boxes, some forms of console I/O, etc, which are tools that the framework has had since the beginning.
Dec 6, 2018 at 7:39 vote accept corentinaltepe
Dec 6, 2018 at 7:39 vote accept corentinaltepe
Dec 6, 2018 at 7:39
Dec 5, 2018 at 20:53 comment added Matthieu M. @CaptainMan: 1:1 threading means mapping one application thread to one OS thread, this is the case in languages such as C, C++, Java or C#. By contrast, M:N threading means mapping M applications threads to N OS threads; in the case of Go, an application thread is called a "goroutine", in the case of Erlang, it's called an "actor", and you may also have heard of them as "green threads" or "fibers". They provide concurrency without requiring parallelism. Unfortunately the Wikipedia article on the topic is rather sparse.
Dec 5, 2018 at 20:47 comment added Matthieu M. @jpmc26: Mostly, indeed. Isolating I/O at the boundary also makes it easier to unit-test. The one special-case, though, is logging.
Dec 5, 2018 at 19:44 comment added Captain Man What do you mean by "M:N" and "1:1" threading?
Dec 5, 2018 at 17:35 comment added jpmc26 IO functions do have a tendency to spread, but with diligence, you can mostly isolate them to functions near (in the stack when calling) entry points of your code. You can do this by having those functions call the IO functions and then have other functions process the output from them and return any results needed for further IO. I find that this style makes my code bases much easier to manage and work with. I wonder if there's a corollary with synchronicity.
Dec 5, 2018 at 12:58 history answered Matthieu M. CC BY-SA 4.0