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

Promise Module → Async Module? #16

Closed
ChristianGruen opened this issue Feb 22, 2016 · 3 comments
Closed

Promise Module → Async Module? #16

ChristianGruen opened this issue Feb 22, 2016 · 3 comments

Comments

@ChristianGruen
Copy link

You convinced me in indicating that the fork-join code is indeed not dependent on the promise pattern, so I’m currently wondering if we should define an Async Module (alternative names are welcome), which includes your promise:fork-join function, and possibly some more functions based on the ideas that have been developed by @apb2006 and discussed in BaseXdb/basex#1211. Do you think that would make sense? We could e.g. define this module as W3C EXPath Module:

(: Namespace: async = 'http://expath.org/spec/async' :)
async:fork-join($functions as function(*))) as item()*,
async:fork-join($functions as function(*)), $options as map(*)) as item()*

Keys allowed for $options:

  • threads (?): number of threads to allow in the pool (default, maybe implementation-defined: number of CPU cores available on the current system)
  • thread-size (?): number of functions to be evaluated by each thread (default: 1)
@james-jw
Copy link
Owner

I think this sounds like a great idea. And as you stated, we could also combine some other great approaches such as those applied in APB's module!

If we could standardize this as well, that would be great!

@mgaerber
Copy link
Contributor

Hi guys, I see this is the conversation to my question just sent to the mailing list...

So I'll just give it a try and create a promise with the (other) async:fork-join

@james-jw
Copy link
Owner

See #18

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

No branches or pull requests

3 participants