I want to only proceed with my execution when a certain channel blocks waiting for data to come (the blocking channel is part of a working go routine, supposed to run in parallel).
Like:
func foo(c chan bool) {
go start_blocking(c)
// only come here, when channel c actually blocks!
}
func start_blocking(c chan bool) {
<-c
}
How to achieve this?
Purpose:
The channel is waiting for data to come at some time later and it should be ready in the background, before the main execution continues.