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

Implement a parallelizable query #2117

Merged
merged 19 commits into from
Mar 1, 2019
Merged

Implement a parallelizable query #2117

merged 19 commits into from
Mar 1, 2019

Conversation

linas
Copy link
Member

@linas linas commented Mar 1, 2019

The QueryLink is (almost) exactly like the BindLink but it can be run in parallel threads.

; -------------
; Define a simple query. It looks for the funny stuff, and attaches
; the result to an AnchorNode
(define query
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this query going to run in separate thread?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes ... the ParallelLink creates three threads, running that query in one of them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at bottom:

(define threads
   (Parallel
      (SequentialAnd
         (prtime "step one A")
         (True query)
         (True (Sleep (Number 4)))
... etc.

@linas linas merged commit 4bb63a5 into opencog:master Mar 1, 2019
@linas linas deleted the gah branch March 1, 2019 18:38
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

Successfully merging this pull request may close these issues.

2 participants