Giter Club home page Giter Club logo

torc_py's Issues

submitting future objects by reference

Hi, this looks like a cool project - I'm looking forward to trying it more extensively.

In a few other distributed libraries (e.g. dask and ray) you can pass objects around indirectly just by re-submitting the future. E.g. something like:

def foo(x):
    return x + 1

def bar(x):
    return x**2

# get the first future
f1 = pool.submit(foo, 2)

# submit its answer by reference
f2 = pool.submit(bar, f1)

# get the final answer, without ever gathering f1.result()
f2.result()
# 9

I.e. the workers communicate the result of f1 directly without it passing through the main process, which can be a big efficiency saving for large return objects.

I guess my questions are:

  • I'm not totally sure how torcpy is designed, so would it still be beneficial here? and if so, how easy?

Wait for some tasks but not for others

I was wondering if/how it is possible, to wait for only the completion of some sub-tasks but not all. If I am reading the code correct, the torc.wait() function does not use arguments, is that right?

I was hoping to do something along the lines of

task1 = torc.submit(...).
task2 = torc.submit(...).
torc.wait(task1)

so that the code only has to wait for task1 to complete but can continue while task2 is still running. Is that possible?

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.