Coder Social home page Coder Social logo

dart_queue's People

Contributors

axel-op avatar bungeefan avatar bw-flagship avatar rknell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dart_queue's Issues

In readme file Import path is incorrect.

I am getting error if I user import path as

import "package:dart_queue/dart_queue.dart";

It is resolved by keeping path as

import "package:queue/queue.dart";

Insert new item in front

It would be nice to get a method to insert a new element at the front of the queue vs. only adding items to the end.

Wait for all futures before disposing?

Hi, thanks for this useful plugin!

Would it be possible to add a way to wait on all futures before disposing? I'm using this to queue writes to a file, so it'd be quite helpful as it's important data that needs to be written.

how can I stop the queue better?

After the queue calls the cancel method, it cannot re-add a new future to the queue because a QueueCancelledException will be reported after adding it. So how can I stop the queue better?

The remainingItems stream is not returning any value

`class FutureQueueService {
static final FutureQueueService _singleton = FutureQueueService._internal();

factory FutureQueueService() {
return _singleton;
}

FutureQueueService._internal() {
queue = Queue();
final remainingItemsStream = queue.remainingItems
.listen((numberOfItems) => log('numberOfItems $numberOfItems'));
}

}`

The queue is able to complete all the future task one-by-one, but the stream is not begin called atall.
The log isnt getting printed.

What is "unawaited" used for?

Can you explain why you're using this piece of code to execute _process() method?

void unawaited(Future<void> future) {}

Queue.onComplete not return when queue is empty

I used queue to wait for all requests finished like this:

var queue = Queue(parallel: 4);
for (final item in items) {
   if(valid(item)) {
        queue.add(() => _sendRequest(item));
   }
}

await queue.onComplete;
print('completed');

For some reasons, if there is no valid item in for loop, the queue is empty. And in this case it pauses at await queue.onComplete forever.
Expect: it should allow to go through next line if queue is empty.

Is this package still maintained?

Hi @rknell, what is the status of the package? Are you actively maintaining it, looking for contributors or something else?

I noticed that there was no activity in the last months, should we guess that the gin distillery is taking more time than expected?
Let us know what kind of support you need here, if any, and/or what is the plan for this package.

All the best ๐Ÿ‘‹

Specify the maximum size

In combination with #6, a way to limit the queue in size would be helpful as well.

This may be trickier to achieve if items are added from both sides.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.