Re: [go-nuts] Blocking in C functions called from go

2017-10-19 Thread 'Pushkar Pradhan' via golang-nuts
Konstantin, Thanks for the detailed explanation. That was helpful. On Thu, Oct 19, 2017 at 3:51 AM, Konstantin Khomoutov wrote: > On Fri, Oct 13, 2017 at 12:23:42PM -0700, 'Pushkar' via golang-nuts wrote: > > > I need to call some C functions from Go. I think I know how to proceed > > using cgo.

Re: [go-nuts] Blocking in C functions called from go

2017-10-19 Thread Konstantin Khomoutov
On Fri, Oct 13, 2017 at 12:23:42PM -0700, 'Pushkar' via golang-nuts wrote: > I need to call some C functions from Go. I think I know how to proceed > using cgo. > However, I was wondering how goroutines and blocking calls in the C > functions work together. > So in the below example (pseudocode)

Re: [go-nuts] Blocking in C functions called from go

2017-10-13 Thread Ian Lance Taylor
On Fri, Oct 13, 2017 at 12:23 PM, 'Pushkar' via golang-nuts wrote: > I need to call some C functions from Go. I think I know how to proceed using > cgo. > However, I was wondering how goroutines and blocking calls in the C > functions work together. > So in the below example (pseudocode) will the

[go-nuts] Blocking in C functions called from go

2017-10-13 Thread 'Pushkar' via golang-nuts
I need to call some C functions from Go. I think I know how to proceed using cgo. However, I was wondering how goroutines and blocking calls in the C functions work together. So in the below example (pseudocode) will the goroutine be suspended when the pthread_lock call is waiting to acquire the