Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explicitly document the use of ttype for async ops #460

Open
andre-merzky opened this issue Sep 11, 2015 · 3 comments
Open

explicitly document the use of ttype for async ops #460

andre-merzky opened this issue Sep 11, 2015 · 3 comments

Comments

@andre-merzky
Copy link
Member

No description provided.

@andre-merzky andre-merzky added this to the 0.37 milestone Sep 15, 2015
@ibethune ibethune modified the milestones: 0.37, Backburner Jan 30, 2017
@vivek-bala
Copy link
Contributor

Not sure which async ops this refers to. @andre-merzky any pointers?

@andre-merzky
Copy link
Member Author

andre-merzky commented Mar 27, 2019

All methods in SAGA can be called as async methods:

f = rs.filesystem.File('/etc/passwd')

# synchronous call
print f.get_size()

# this is equivalent to this version which creates a task in a final state (synchronous call)
task = f.get_size(ttype=rs.SYNC)
print task.get_result()

# this is a version creating a RUNNING task which one needs to wait on to get the result:
task = f.get_size(ttype=rs.ASYNC)
task.wait()
print task.get_result()

# this is a version creating a NEW task which one needs to run and wait on to get the result:
task = f.get_size(ttype=rs.TASK)
task.run()
task.wait()
print task.get_result()

This holds for every method of the functional API packages. Its rarely used, but still, it needs proper documentation.

@vivek-bala
Copy link
Contributor

Thanks for the info! I'll leave this ticket open then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants