Tuesday, 15 February 2011

concurrency - Send channel through a channel with Go -


I want to send an indicator to a channel via a channel. Is it possible to know? How are functions that accept such a channel defined?

I tried:

  Funk Exam () (chan * chan) Funk criterion (chan chan)  

There are always some types associated with a channel. Assume that type T is a channel of T:

  chan t  

is an indicator in a channel of T :

  * There is a channel of the indicator for Chan T's channel:  
  chan * chan T  

Accepting the function is the channel of the indicator for T's channel:

  func f (c chan * chan t) {}  

because the channel reference types are , You probably do not need to use an indicator

  func (fc chan chan T) {}  

< / P>


No comments:

Post a Comment