Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creation of the Flowable operators, Observable operators reordering.
- Loading branch information
teivah
committed
Dec 12, 2018
1 parent
8ec454a
commit dc2bb0d
Showing
3 changed files
with
490 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,13 @@ | ||
package rxgo | ||
|
||
import ( | ||
"fmt" | ||
"github.com/reactivex/rxgo/handlers" | ||
"github.com/reactivex/rxgo/options" | ||
"testing" | ||
"time" | ||
) | ||
|
||
func TestFlowable(t *testing.T) { | ||
Just(1, 2, 3). | ||
ToFlowable(options.WithDropBackpressureStrategy()). | ||
Map(func(i interface{}) interface{} { | ||
return i.(int) + 10 | ||
}).Subscribe(handlers.NextFunc(func(i interface{}) { | ||
fmt.Printf("%v\n", i) | ||
})) | ||
time.Sleep(1 * time.Second) | ||
|
||
} | ||
//func TestFlowable(t *testing.T) { | ||
// Just(1, 2, 3). | ||
// ToFlowable(options.WithDropBackpressureStrategy()). | ||
// Map(func(i interface{}) interface{} { | ||
// return i.(int) + 10 | ||
// }).Subscribe(handlers.NextFunc(func(i interface{}) { | ||
// fmt.Printf("%v\n", i) | ||
// })) | ||
// time.Sleep(1 * time.Second) | ||
// | ||
//} |
Oops, something went wrong.