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

multi-thread support #7

Open
dataf3l opened this issue Aug 15, 2019 · 5 comments
Open

multi-thread support #7

dataf3l opened this issue Aug 15, 2019 · 5 comments

Comments

@dataf3l
Copy link

dataf3l commented Aug 15, 2019

Does this program support multi-threaded programming?

@dataf3l
Copy link
Author

dataf3l commented Aug 15, 2019

I'm asking because doing "ack thread" yields some results, the word thread is mentioned a lot in the lua module, but it isn't mentioned on the other modules as much, only an include on the core file, so I think it is reasonable to assume without in-depth knowledge of the codebase, that the code does not support multiple threads in paralel executing tasks, that is, each node in the network isn't ran on a different thread, but instead, it looks like a single threaded program (this makes sense.

If you consider the program probably started before the moore law stopped being a thing (90s?? early 2000s?), and in general multi-core computers were not a thing yet), so should this program become paralel?

Should this program be altered to add multi-threaded capabilities, using a portable c or c++ library that supports threads like posix?

and, if I'm wrong and the program actually IS multi-core, where are the guts of the multi-core logic defined?

@jpaulm
Copy link
Owner

jpaulm commented Aug 16, 2019

Good question! I use BOOST - https://www.boost.org/ - to provide multithreading. It allows every C++FBP process to run in its own thread... I did mention BOOST in the web page, but I guess I didn't say why I use it! I will try to fix that!

@jpaulm
Copy link
Owner

jpaulm commented Aug 16, 2019

More info on BOOST has been added to https://github.com/jpaulm/fbp, and also to https://github.com/jpaulm/cppfbp/blob/master/README.md . Please let me know if it needs more info... TIA

@dataf3l
Copy link
Author

dataf3l commented Oct 12, 2019 via email

@jpaulm
Copy link
Owner

jpaulm commented Oct 12, 2019

Ah, I see! I wrote "an older C implementation called THREADN, which used longjmp and setjmp", which could, I guess, be confusing! The scheduling parts of CppFBP now use BOOST, which I did mention - it's the other parts of THREADN which have largely stayed the same. I will rephrase the Readme...

Thanks, Felipe!

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