Giter Club home page Giter Club logo

taskchain's Issues

Wiki / Readme update

Build some wiki pages with better documentation and examples

spruce up readme even more

Sponge Support

Major Issue: No API to determine isMainThread

Desire: Use PluginContainer for SpongeTaskChainFactory.create()

User supplied Queues and Executors

Desire to allow user to supply their own queue to Bukkit/Sponge implementations.

Major Issue:
Right now, a factory is expected to be 1 to 1 relation to its queue.
if factory shuts down, the queue shuts down.

But what if 2 factories share the same queue?

How do we process shutdown of a factory and block until its tasks are flushed from the async queue but allow the other factories to continue?

Unit Tests

Need an asynchronous testing solution.

Data Wrapper Chains

any data wrapper based method should be able to return a DataWrappedChain. There should be a chain for 2-6 of each data class.

The chains should provide extra methods so you can access the data properties such as .sync((var1, var2, var3) -> { instead of (data) -> { data.var1

to avoid massive duplication of methods, were going to need to update add0() to be overloaded on a data wrapped chain to call it on the wrapped chain instead of the wrapper

Concerns:

Can we pull this off returning a different object without breaking existing API's?
I think so when adding overloaded versions of each api.

Need to really see if we can break out these API methods into interfaces to start to organize the API names better.

Queue API

Provide an API that can take a queue, and provide a queue processor.

Sync option:
parameters to configure # of elements of the queue to process per run, and how long to wait in between each process of the queue.

game units should use the game scheduler to advance to next run and rl time units should use async delays to control for that (but return to sync)

Async option should also provide optional concurrency level, and delays.

Prepend task to shared chain

Is it currently possible to insert into shared chain at the beginning, not the end? I'm using taskchain for queue-like thing and I need to make some tasks high priority.

In the current scenario, I'm adding things to the queue like this:

sharedChain.async(..).asyncFirstCallback(..).sync(..).execute()

Folia Support

Will you support folia? Any plans to add Folia support? The project hasn't been updated in quite some time and I am curious if it is abandoned. I find it useful, but if its no longer supported by the developer I will move on. Thanks!

How do you even use this?

This project is missing pretty much all usable documentation, same for Spigot and Bukkit and Paper as well. I don't know how anybody learns how to use any of this.

I'm just trying to make a long running task in a separate thread and all I have to go on is old questions people have asked which talked about this project because there's never any proper well-written up-to-date and short and concise tutorials anywhere. A bunch of Spigot threads dumped me here and I'm still lost.

The Usage page on the wiki is all I have on how to use this and it's not even a tutorial, it's just a copy and paste blob of code that doesn't make any kind of sense at all.

Can we start with a HelloWorld tutorial that's as short and simple as possible then progressively explain each and every feature stepping me through bit by bit one at a time with each tutorial being as small, short, and simple as possible until we progress to the intermediate and then advanced stages.

I'm never going to understand any of this without that and I don't see how anybody else can either. Why do developers almost exclusively just give a giant mutli-page blob of code and then expect everyone to figure it out on their own?

Sorry for rant, I feel like I'm climbing mount everest and back just to do the simplest things which adds days and weeks to the simplest plugins because there's almost always never any tutorials anywhere by anyone unless it's 10 years out of date and poorly written. It's often just here's a blob of code or JavaDoc, figure it out yourself.

Question: HotSwappable

Is it possible to use TaskChains / Lambda's and retain the ability to hotswap the code whilst developing server concepts?

Repeat Task until Condition is met

It would be nice to have repeating tasks in the chain.
something like this:

newChain().repeat(c-> c.repeat(c->c.delay(10, TimeUnit.SECONDS).sync(this::updateSigns),6).async(this::updateDB),-1)

would do something like this

while(true){
   for(int i = 0;i<6;i++){
       wait(10, second)
       (sync) updateSigns();
   }
   (async)updateDB();
}

(repeat would take a lambda that does stuff with a new chain that will be executed every time repeat is called)
Don't really know if the way I outlined that api is a good thing to do something like that, but I think the general concept of repeating some parts of a chain n (or -1 for endless) times.

BungeeCord support

Is this possible? I tried implementing myself but I failed on the shutdown hooks (because Bungee doesn't has a proper event or shutdown method)

executeFuture support

An alternative to .execute(), that returns a future that is resolved with the last returned value (if the last is generic/doesnt return, Object is used and null)

If .executeFuture is used, the chain should note that, and any uncaught exception should bubble to the pending future.

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.