can't direct call by Go? I understand the calling conversion between these two worlds different, but couldn't we just "save" them (eg. push REG and pop it back).
I've read runtime.cgocall but i didn't understand how it is corelated with G (goroutine) stuff and TSAN.
Well for one, C calls would have to always happen from the same OS thread probably
(But you still need call runtime.LockOSThread to archive it
https://stackoverflow.com/questions/28272285/why-cgos-performance-is-so-slow-is-there-something-wrong-with-my-testing-code
Обсуждают сегодня