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

Is it okay to call wagyu::execute() multiple times? #102

Open
bylee20 opened this issue Dec 20, 2019 · 1 comment
Open

Is it okay to call wagyu::execute() multiple times? #102

bylee20 opened this issue Dec 20, 2019 · 1 comment

Comments

@bylee20
Copy link

bylee20 commented Dec 20, 2019

Is it okay to call wagyu::execute() multiple times on same wagyu instance?
Or, should I build new wagyu instance for each execution?

Here are some example usecases:

  • add/add/execute(union)/execute(difference)
  • add/add/execute(union)/add/execute(intersection)

If it is allowed, is it thread-safe?

Thank you.

@flippmoke
Copy link
Member

Honest answer, I am not entirely sure right now. Its been a while since I touched this code. I do remember designing it with this intent though!

Just quickly glancing at the code if the minima list could be passed as const to the two methods here it would definitely be able to run it multiple times.

It would not be thread safe if any modification to the minima list occurred, I would encourage new wagyu objects for each thread.

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

2 participants