To continue on ‘what is going on under the hood’: what happens to code that terminates go-routines.
We have build an extensive architecture functional simulator in Go of our hardware. There are two patterns that we use that I would like to understand how they would be processed.
The first pattern is the use of passing pointers to data structures that are sometimes pooled so that the simulation doesn’t pay the overhead of memory allocations of each and every transaction/package that gets communicated in the CSP model.
The second pattern is the use of special paths to terminate the go-routines. We have two patterns, a non-blocking pattern that uses an interrupt channel, and a blocking pattern that can process a STOP command as part of the regular packet data structure that is communicated across the channel that feeds the go-routine.
How would these two patterns be processed?