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

Multithreading improvements #78

Merged
merged 20 commits into from
Nov 17, 2018
Merged

Multithreading improvements #78

merged 20 commits into from
Nov 17, 2018

Conversation

pmconrad
Copy link

@pmconrad pmconrad commented Oct 3, 2018

Part of bitshares/bitshares-core#1079
Work in progress, please do not merge yet!

@pmconrad pmconrad self-assigned this Oct 3, 2018
@jmjatlanta
Copy link

The commit comments look awesome. I can't wait to dig in!

@abitmore
Copy link
Member

abitmore commented Oct 3, 2018

Restarted Travis build. It complained that received no output when running all_tests in parallel in 10 minutes.

Copy link

@jmjatlanta jmjatlanta left a comment

Choose a reason for hiding this comment

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

Looks great. I have not tested on mac or Windows. I see there are some platform-specific areas, so will take a hard look at those within the next few days.

}
else
{ // possibly shutdown?
std::cerr << "unhandled exception in thread '" << name << "'\n";

Choose a reason for hiding this comment

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

To compile on Ubuntu 18.04, need to include iostream or remove stdout streams

Copy link
Author

Choose a reason for hiding this comment

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

Added. Thanks!

if( !strcmp( boost::unit_test::framework::master_test_suite().argv[i], "--pool-threads" ) )
{
uint16_t threads = atoi(boost::unit_test::framework::master_test_suite().argv[++i]);
std::cout << "Using " << threads << " pool threads\n";

Choose a reason for hiding this comment

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

To compile on Ubuntu 18.04, need to remove stdout streams or include iostream header

Copy link
Author

Choose a reason for hiding this comment

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

Added. Thanks!

Copy link

@jmjatlanta jmjatlanta left a comment

Choose a reason for hiding this comment

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

Tests ran successfully in Linux, problems on mac and Windows, but highly likely that the problems are unrelated to the multithreading changes.

};

friend class ticket_guard;
boost::atomic<future<void>*> latch;

Choose a reason for hiding this comment

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

need to include boost/atomic/atomic.hpp to compile in Windows.

Copy link
Author

Choose a reason for hiding this comment

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

Added, thanks!

Copy link

@jmjatlanta jmjatlanta left a comment

Choose a reason for hiding this comment

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

Tested with Boost 1.67 / Ubuntu 18.04. Reviewed code and all looks good. Thank you!

@pmconrad pmconrad merged commit 460e7cc into master Nov 17, 2018
@pmconrad pmconrad deleted the multithreading_improvements branch November 17, 2018 09:41
@pmconrad
Copy link
Author

Thanks!

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.

3 participants