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

Calling figtree simultaneously in multiple threads #3

Open
szpiech opened this issue Dec 9, 2015 · 2 comments
Open

Calling figtree simultaneously in multiple threads #3

szpiech opened this issue Dec 9, 2015 · 2 comments

Comments

@szpiech
Copy link

szpiech commented Dec 9, 2015

Thanks for this great package. I have a use case that would benefit from running multiple instances of figtree in different threads, and I noticed this note on the README.

TODO: modify ANN so that it no longer uses global variables (which prevents figtree from being called simultaneously in multiple threads)

Any chance this will happen? Alternatively, would you be able to direct me to the problem portions of code, so that I might attempt a modification myself?

Cheers

@vmorariu
Copy link
Owner

I haven't needed this functionality since I added that TODO item, so it
is not something I am actively working on. From what I understand, the
ANN code (in the external/ann_1.1.1 directory) originally used global
variables for speed (removes one level of indirection in memory lookup).
One solution would be to pass along a structure containing the variables
of interest, so that each call to ANN reads/writes to its own set of
variables. While this is a simple modification, it would involve
touching much of the ANN code, something I had no good reason to do yet.
It is pretty easy to identify the global variables in the ANN code.

On 12/09/15 14:54, Zachary A Szpiech wrote:

Thanks for this great package. I have a use case that would benefit
from running multiple instances of figtree in different threads, and I
noticed this note on the README.

TODO: modify ANN so that it no longer uses global variables (which
prevents figtree from being called simultaneously in multiple threads)

Any chance this will happen? Alternatively, would you be able to
direct me to the problem portions of code, so that I might attempt a
modification myself?

Cheers


Reply to this email directly or view it on GitHub
#3.

@szpiech
Copy link
Author

szpiech commented Dec 10, 2015

Great, thanks for pointing me in the right direction. I'll have to poke around in there when I get some free time.

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