wagyu icon indicating copy to clipboard operation
wagyu copied to clipboard

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

Open bylee20 opened this issue 6 years ago • 1 comments

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.

bylee20 avatar Dec 20 '19 02:12 bylee20

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.

flippmoke avatar Dec 20 '19 17:12 flippmoke