         #...................................................................................................
         pipeline_1          = []
         pipeline_1.push source_1
-        pipeline_1.push PS.$watch ( d ) -> whisper '10191-1', d
+        pipeline_1.push PS.$watch ( d ) -> whisper '10191-2', d
         #...................................................................................................
         pipeline_2          = []
         pipeline_2.push source_2
-        pipeline_2.push PS.$watch ( d ) -> whisper '10191-2', d
+        pipeline_2.push PS.$watch ( d ) -> whisper '10191-3', d
         #...................................................................................................
         pipeline_3          = []
         pipeline_3.push PS.$merge ( PS.pull pipeline_1... ), ( PS.pull pipeline_2... )
         pipeline_3.push PS.$watch ( d ) -> R.push d
-        pipeline_3.push PS.$watch ( d ) -> urge '10191-3', d
+        pipeline_3.push PS.$watch ( d ) -> urge '10191-4', d
         pipeline_3.push PS.$drain drainer
         PS.pull pipeline_3...
         max_idx = ( Math.max probe[ 0 ].length, probe[ 1 ].length ) - 1


  #-----------------------------------------------------------------------------------------------------------
  @$wye = ( bysource ) ->
    send              = null
    mainstream_ended  = false
    bystream_started  = false
    bystream_ended    = false
    #.........................................................................................................
    mainstream        = []
    mainstream.push @$ 'null', ( d, send ) =>
      mainstream_ended = true unless d?
      send d
    mainstream.push @$async ( d, _send, done ) =>
      send = _send
      unless bystream_started
        bystream_started = true
        @pull bystream...
      send d
      done()
      send 'y'
      defer => send 'x'
    mainstream.push @$defer()
    # mainstream.push @$tee ( d ) => urge '***', d
    #.........................................................................................................
    bystream          = []
    bystream.push @$show()
    # bystream.push @$ 'null', ( d, _send ) =>
    #   if d?
    #     send d
    #   else
    #     bystream_ended = true
    bystream.push @$drain()
    #.........................................................................................................
    R                 = @pull mainstream...
    return R

provide_$wye.apply PS

  done()
  return null

#-----------------------------------------------------------------------------------------------------------
@[ "$wye 2" ] = ( T, done ) ->
  probes_and_matchers = [
    [[true,true,["a","b","c"],[1,2,3,4,5,6]],["a",1,"b",2,"c",3,4,5,6],null]
    [[false,true,["a","b","c"],[1,2,3,4,5,6]],["a",1,"b",2,"c",3,4,5,6],null]
    [[false,false,["a","b","c"],[1,2,3,4,5,6]],["a",1,"b",2,"c",3,4,5,6],null]
    [[true,false,["a","b","c"],[1,2,3,4,5,6]],["a",1,"b",2,"c",3,4,5,6],null]
    ]
  #.........................................................................................................
  for [ probe, matcher, error, ] in probes_and_matchers
    matcher = matcher.sort()
    await T.perform probe, matcher, error, ->
      return new Promise ( resolve, reject ) ->
        [ defer_mainstream
          defer_bystream
          mainstream_values
          bystream_values ] = probe
        R                   = []
        drainer             = -> R = R.sort(); resolve R
        mainsource          = PS.new_push_source()
        bysource            = PS.new_push_source()
        #...................................................................................................
        bystream            = []
        bystream.push bysource
        bystream.push PS.$watch ( d ) -> whisper '10191-5', 'bysource', jr d
        bystream.push PS.$defer() if defer_bystream
        bystream = PS.pull bystream...
        #...................................................................................................
        mainstream          = []
        mainstream.push mainsource
        mainstream.push PS.$defer() if defer_mainstream
        mainstream.push PS.$watch ( d ) -> whisper '10191-6', 'mainstream', jr d
        mainstream.push PS.$wye bystream
        mainstream.push PS.$watch ( d ) -> R.push d
        mainstream.push PS.$watch ( d ) -> urge CND.white '10191-7', 'confluence', jr d
        mainstream.push PS.$drain drainer
        PS.pull mainstream...
        max_idx = ( Math.max mainstream_values.length, bystream_values.length ) - 1
        for idx in [ 0 .. max_idx ]
          mainsource.push x if ( x = mainstream_values[ idx ] )?
          bysource.push   x if ( x = bystream_values[   idx ] )?
        mainsource.end()
        bysource.end()
        return null
  done()
  return null




############################################################################################################
unless module.parent?
  test @
  # test @[ "$wye 1" ]
  # test @[ "$wye 2" ]

