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

hpx::threads::get_self() should throw an exception when called outside of a pxthread #46

Closed
brycelelbach opened this issue Jul 10, 2012 · 3 comments

Comments

@brycelelbach
Copy link
Member

[reported by blelbach] [Trac time Tue Aug 9 21:08:56 2011] get_self() has been one of our biggest causes of segmentation faults. A few weeks ago I modified this function to raise an assertion when called outside of a PX thread, however, this only affects debug modes (assertions are turned off for full release). This function (and possibly the underlying get_self_ptr()) should throw an exception if they are used outside of pxthreads.

@brycelelbach
Copy link
Member Author

[comment by hkaiser] [Trac time Wed Aug 10 13:30:46 2011] get_self_ptr() should not throw nor assert as its purpose is to be able to test whether the thread is executing as a px-thread. If it returns NULL it's executing outside of the HPX thread-manager, non-NULL otherwise.

@brycelelbach
Copy link
Member Author

[comment by blelbach] [Trac time Wed Aug 10 15:22:45 2011] Understood!

@brycelelbach
Copy link
Member Author

[comment by blelbach] [Trac time Thu Aug 11 20:38:45 2011] This was already fixed, r4770

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

1 participant