If you use a buffered channel (buffer size one), then the channel put 
doesn't block:

     `retainChan := make(chan *PipelineCapture, 1)`

On 5/15/13 9:37 AM, Ben Bangert wrote:
> In pipeline/pipeline_runner.go:
>
>>  func (foRunner *foRunner) InChan() (inChan chan *PipelineCapture) {
>> +	if foRunner.retainPack != nil {
>> +		retainChan := make(chan *PipelineCapture)
>> +		go func() {
>> +			retainChan <- foRunner.retainPack
>> +			foRunner.retainPack = nil
>> +			close(retainChan)
>> +		}()
>> +		return retainChan
>> +	}
>
> Plugin's need to call InChan() and get a channel back immediately before
> they can proceed. If this doesn't use a goroutine, the method call will
> block forever until the other side takes the pack, which it can't do
> since the runner will block then on starting the plugin...
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/mozilla-services/heka/pull/177/files#r4238521>.
>