@@ -320,10 +320,10 @@ forLoop:
320320 return myModule , err
321321}
322322
323- //parseModuleMultithreaded is the parallel parsing version of parseModule.
324- //it computes the start and the end of the module struct
325- //and splits it up among numProc number of goroutines
326- //which each execute a separate moduleMainLoop
323+ // parseModuleMultithreaded is the parallel parsing version of parseModule.
324+ // it computes the start and the end of the module struct
325+ // and splits it up among numProc number of goroutines
326+ // which each execute a separate moduleMainLoop
327327func parseModuleMultithreaded (tok * tokenGenerator ) (module , error ) {
328328 //Bulk init of an average number of objects contained in a modern a2l-file.
329329 log .Info ().Msg ("creating maps for module subtypes" )
@@ -449,9 +449,9 @@ forLoop:
449449 return myModule , err
450450}
451451
452- //collectChannelsMultithreaded uses anonymous function to collect the data sent by the goroutines running the moduleMainLoop.
453- //usually the Select Collector is to be prefered as it is mostly faster and always easier on memory
454- //as the additional goroutines spun up in collectChannelsMultithreaded seem to block the GC a lot
452+ // collectChannelsMultithreaded uses anonymous function to collect the data sent by the goroutines running the moduleMainLoop.
453+ // usually the Select Collector is to be prefered as it is mostly faster and always easier on memory
454+ // as the additional goroutines spun up in collectChannelsMultithreaded seem to block the GC a lot
455455func collectChannelsMultithreaded (myModule * module , cA2ml chan a2ml , cAxisPts chan axisPts , cBlob chan blob , cCharacteristic chan Characteristic ,
456456 cCompuMethod chan compuMethod , cCompuTab chan compuTab , cCompuVtab chan compuVTab ,
457457 cCompuVtabRange chan compuVTabRange , cFrame chan frame , cFunction chan function ,
@@ -659,10 +659,10 @@ func collectChannelsMultithreaded(myModule *module, cA2ml chan a2ml, cAxisPts ch
659659 log .Info ().Msg ("all collectors finished" )
660660}
661661
662- //closeChannelsAfterParsing closes all channels when the parser routines have finished
663- //and wgParser.Wait() is over.
664- //channels have to be closed in order for the collector to recognize when it is done
665- //because no more data can be sent and all channels are empty
662+ // closeChannelsAfterParsing closes all channels when the parser routines have finished
663+ // and wgParser.Wait() is over.
664+ // channels have to be closed in order for the collector to recognize when it is done
665+ // because no more data can be sent and all channels are empty
666666func closeChannelsAfterParsing (wg * sync.WaitGroup , cA2ml chan a2ml , cAxisPts chan axisPts , cBlob chan blob , cCharacteristic chan Characteristic ,
667667 cCompuMethod chan compuMethod , cCompuTab chan compuTab , cCompuVtab chan compuVTab ,
668668 cCompuVtabRange chan compuVTabRange , cFrame chan frame , cFunction chan function ,
@@ -704,7 +704,7 @@ func closeChannelsAfterParsing(wg *sync.WaitGroup, cA2ml chan a2ml, cAxisPts cha
704704 log .Info ().Msg ("parsers finished, closed all channels" )
705705}
706706
707- //parseModuleMainLoop is used by the parseModuleMultithreaded function to run the module parser in individual goroutines
707+ // parseModuleMainLoop is used by the parseModuleMultithreaded function to run the module parser in individual goroutines
708708func parseModuleMainLoop (wg * sync.WaitGroup , minIndex int , maxIndex int ,
709709 cA2ml chan a2ml , cAxisPts chan axisPts , cBlob chan blob , cCharacteristic chan Characteristic ,
710710 cCompuMethod chan compuMethod , cCompuTab chan compuTab , cCompuVtab chan compuVTab ,
0 commit comments