File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11using Open . Threading ;
22using System ;
3- using System . Diagnostics ;
4- using System . Threading . Tasks ;
5- using System . Threading . Tasks . Dataflow ;
63
74namespace Open . Disposable
85{
Original file line number Diff line number Diff line change 1- using Open . Threading ;
2- using System ;
3- using System . Diagnostics ;
1+ using System ;
42using System . Threading ;
53using System . Threading . Tasks ;
64
@@ -70,7 +68,7 @@ protected void OnGivenTo(bool wasGiven)
7068
7169 public void Give ( T item )
7270 {
73- if ( PrepareToReceive ( item ) && ( GaveToPocket ( ref item ) || Receive ( item ) ) )
71+ if ( PrepareToReceive ( item ) && ( GaveToPocket ( ref item ) || Receive ( item ) ) )
7472 OnGivenTo ( ) ;
7573 }
7674
@@ -83,9 +81,9 @@ public virtual Task GiveAsync(T item)
8381 {
8482 if ( item == null ) return Task . FromResult ( false ) ;
8583 return GiveInternalAsync ( item )
86- . OnFullfilled ( ( Action < bool > ) OnGivenTo ) ;
84+ . ContinueWith ( t => OnGivenTo ( t . Result ) ) ;
8785 }
88-
86+
8987 public virtual T Take ( )
9088 {
9189 return TryTake ( ) ?? Factory ( ) ;
Original file line number Diff line number Diff line change 1- using Open . Threading ;
2- using System ;
1+ using System ;
32using System . Diagnostics ;
4- using System . Threading . Tasks ;
53
64namespace Open . Disposable
75{
You can’t perform that action at this time.
0 commit comments