Permalink
Browse files

merge quiver.streams into quiver.async (fixes #177)

  • Loading branch information...
yjbanov committed Apr 8, 2015
1 parent abc705c commit 671f1bc75742b4393e203c9520a3bf1e031967dc
View
@@ -25,6 +25,19 @@ We recommend the following version constraint:
Utilities for working with Futures, Streams and async computations.
`collect` collects the completion events of an `Iterable` of `Future`s into a
`Stream`.
`enumerate` and `concat` represent `Stream` versions of the same-named
[quiver.iterables][] methods.
`doWhileAsync`, `reduceAsync` and `forEachAsync` perform async computations on
the elements of on Iterables, waiting for the computation to complete before
processing the next element.
`StreamBuffer` allows for the orderly reading of elements from a stream, such
as a socket.
`FutureGroup` is collection of Futures that signals when all its child futures
have completed. Allows adding new Futures as long as it hasn't completed yet.
Useful when async tasks can spwn new async tasks and you need to wait for all of
@@ -39,10 +52,6 @@ predicates.
`CountdownTimer` is a simple countdown timer that fires events in regular
increments.
`doWhileAsync`, `reduceAsync` and `forEachAsync` perform async computations on
the elements of on Iterables, waiting for the computation to complete before
processing the next element.
`CreateTimer` and `CreateTimerPeriodic` are typedefs that are useful for
passing Timer factories to classes and functions, increasing the testability of
code that depends on Timer.
@@ -164,19 +173,6 @@ used as a literal match inside of a RegExp.
[quiver.pattern]: http://www.dartdocs.org/documentation/quiver/latest#quiver/quiver-pattern
## [quiver.streams][]
`collect` collects the completion events of an `Iterable` of `Future`s into a
`Stream`.
`enumerate` and `concat` represent `Stream` versions of the same-named
[quiver.iterables][] methods.
`StreamBuffer` allows for the orderly reading of elements from a stream, such
as a socket.
[quiver.streams]: http://www.dartdocs.org/documentation/quiver/latest#quiver/quiver-streams
## [quiver.strings][]
`isBlank` checks if a string is `null`, empty or made of whitespace characters.
View
@@ -16,13 +16,18 @@ library quiver.async;
import 'dart:async';
import 'package:quiver/iterables.dart' show IndexedValue;
import 'package:quiver/time.dart';
part 'src/async/collect.dart';
part 'src/async/countdown_timer.dart';
part 'src/async/concat.dart';
part 'src/async/enumerate.dart';
part 'src/async/future_group.dart';
part 'src/async/future_stream.dart';
part 'src/async/iteration.dart';
part 'src/async/metronome.dart';
part 'src/async/stream_buffer.dart';
part 'src/async/stream_router.dart';
/**
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
part of quiver.streams;
part of quiver.async;
/**
* Returns a stream of completion events for the input [futures].
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
part of quiver.streams;
part of quiver.async;
/**
* Returns the concatentation of the input streams.
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
part of quiver.streams;
part of quiver.async;
/**
* Returns a [Stream] of [IndexedValue]s where the nth value holds the nth
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
part of quiver.streams;
part of quiver.async;
/**
* Underflow errors happen when the socket feeding a buffer is finished while
View

This file was deleted.

Oops, something went wrong.
View
@@ -23,7 +23,6 @@ import 'io_test.dart' as io;
import 'iterables/all_tests.dart' as iterables;
import 'mirrors_test.dart' as mirrors;
import 'pattern/all_tests.dart' as pattern;
import 'streams/all_tests.dart' as streams;
import 'strings_test.dart' as strings;
import 'testing/all_tests.dart' as testing;
import 'time/all_tests.dart' as time;
@@ -38,7 +37,6 @@ main() {
iterables.main();
mirrors.main();
pattern.main();
streams.main();
strings.main();
testing.main();
time.main();
@@ -14,20 +14,28 @@
library quiver.async.all_tests;
import 'collect_test.dart' as collect;
import 'concat_test.dart' as concat;
import 'countdown_timer_test.dart' as countdown_timer;
import 'create_timer_test.dart' as create_timer;
import 'enumerate_test.dart' as enumerate;
import 'future_group_test.dart' as future_group;
import 'future_stream_test.dart' as future_stream;
import 'iteration_test.dart' as iteration;
import 'metronome_test.dart' as metronome;
import 'stream_buffer_test.dart' as stream_buffer;
import 'stream_router_test.dart' as stream_router;
main() {
collect.main();
concat.main();
countdown_timer.main();
create_timer.main();
enumerate.main();
future_group.main();
future_stream.main();
metronome.main();
iteration.main();
stream_buffer.main();
stream_router.main();
}
@@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
library quiver.streams.collect_test;
library quiver.async.collect_test;
import 'dart:async';
import 'dart:math';
import 'package:test/test.dart';
import 'package:quiver/streams.dart';
import 'package:quiver/async.dart';
main() {
group('collect', () {
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
library quiver.streams.concat_test;
library quiver.async.concat_test;
import 'dart:async';
import 'package:test/test.dart';
import 'package:quiver/streams.dart';
import 'package:quiver/async.dart';
main() {
group('concat', () {
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
library quiver.streams.enumerate_test;
library quiver.async.enumerate_test;
import 'dart:async';
import 'package:test/test.dart';
import 'package:quiver/streams.dart';
import 'package:quiver/async.dart';
main() {
group('enumerate', () {
@@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
library quiver.streams.streambuffer_test;
library quiver.async.stream_buffer_test;
import 'dart:async';
import 'package:test/test.dart';
import 'package:quiver/streams.dart';
import 'package:quiver/async.dart';
void main() {
group("StreamBuffer", () {

This file was deleted.

Oops, something went wrong.

0 comments on commit 671f1bc

Please sign in to comment.