{"action":"created","issue":{"url":"https://api.github.com/repos/dealii/dealii/issues/524","labels_url":"https://api.github.com/repos/dealii/dealii/issues/524/labels{/name}","comments_url":"https://api.github.com/repos/dealii/dealii/issues/524/comments","events_url":"https://api.github.com/repos/dealii/dealii/issues/524/events","html_url":"https://github.com/dealii/dealii/pull/524","id":57398269,"number":524,"title":"Do not allow instantiation of MultithreadInfo","user":{"login":"tjhei","id":1531285,"avatar_url":"https://avatars.githubusercontent.com/u/1531285?v=3","gravatar_id":"","url":"https://api.github.com/users/tjhei","html_url":"https://github.com/tjhei","followers_url":"https://api.github.com/users/tjhei/followers","following_url":"https://api.github.com/users/tjhei/following{/other_user}","gists_url":"https://api.github.com/users/tjhei/gists{/gist_id}","starred_url":"https://api.github.com/users/tjhei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjhei/subscriptions","organizations_url":"https://api.github.com/users/tjhei/orgs","repos_url":"https://api.github.com/users/tjhei/repos","events_url":"https://api.github.com/users/tjhei/events{/privacy}","received_events_url":"https://api.github.com/users/tjhei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-12T00:11:02Z","updated_at":"2015-02-12T15:40:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dealii/dealii/pulls/524","html_url":"https://github.com/dealii/dealii/pull/524","diff_url":"https://github.com/dealii/dealii/pull/524.diff","patch_url":"https://github.com/dealii/dealii/pull/524.patch"},"body":"If the user creates her own instance of MultithreadInfo, the\r\nfunctionality in set_thread_limit() won't work correctly. This patch\r\nmakes the constructor private, create a factory function get_instance()\r\nand changes the global variable multithread_info into a reference."},"comment":{"url":"https://api.github.com/repos/dealii/dealii/issues/comments/74091855","html_url":"https://github.com/dealii/dealii/pull/524#issuecomment-74091855","issue_url":"https://api.github.com/repos/dealii/dealii/issues/524","id":74091855,"user":{"login":"bangerth","id":7504421,"avatar_url":"https://avatars.githubusercontent.com/u/7504421?v=3","gravatar_id":"","url":"https://api.github.com/users/bangerth","html_url":"https://github.com/bangerth","followers_url":"https://api.github.com/users/bangerth/followers","following_url":"https://api.github.com/users/bangerth/following{/other_user}","gists_url":"https://api.github.com/users/bangerth/gists{/gist_id}","starred_url":"https://api.github.com/users/bangerth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bangerth/subscriptions","organizations_url":"https://api.github.com/users/bangerth/orgs","repos_url":"https://api.github.com/users/bangerth/repos","events_url":"https://api.github.com/users/bangerth/events{/privacy}","received_events_url":"https://api.github.com/users/bangerth/received_events","type":"User","site_admin":false},"created_at":"2015-02-12T15:40:45Z","updated_at":"2015-02-12T15:40:45Z","body":"The patch is ok if you fix the typo and if you mention somewhere in the documentation of the class that it satisfies the \"Singleton\" pattern. If you only allow for a single instance, there is no reason not to make the (single) member function static, along with all member functions. In that case, would you need anything in the constructor at all? I think you'd only need to run a function to initilize (via operator=) the member variables."}}