Thanks Ian for the inputs. I was trying to migrate our CPP application to GO in a phased manner. I thought of first plugging out the threadpool and replace it with GO's implementation. I understand the approach is not correct , instead plugging out partial functionality from CPP application and making a seperate GO microservice might give some improvements.
Regards, On Monday, August 26, 2019 at 11:27:49 PM UTC+5:30, Ian Lance Taylor wrote: > > On Mon, Aug 26, 2019 at 10:48 AM <sudars...@gmail.com <javascript:>> > wrote: > > > > I am planning to replace C++ threadpool class with goroutines. I see > several go implementations for threadpool. > > Without getting into how to do this, why do you want to do this? > Goroutines work very well for Go code, but when Go code calls into C++ > code, it uses up a thread. The Go scheduler support for multiplexing > goroutines onto threads does not work for goroutines that call into > C++ (or any other non-Go language). So I don't think you will get any > advantage by using goroutines instead of a C++ threadpool to run C++ > code. > > Ian > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/38ecd073-6fda-4ab7-9238-f394acf92c15%40googlegroups.com.