diff options
author | Martin Sustrik <sustrik@fastmq.commkdir> | 2009-12-15 23:49:55 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@fastmq.commkdir> | 2009-12-15 23:49:55 +0100 |
commit | 8aa0908635f255e2d533539d5330b92b62dc88ba (patch) | |
tree | f72f8dc99463cb0e56213dbde735ed585986cbfb /src/dispatcher.cpp | |
parent | 2cef05d86976784f4bc1083cb0fa548e267ac132 (diff) |
all news converted to nothrow variant
Diffstat (limited to 'src/dispatcher.cpp')
-rw-r--r-- | src/dispatcher.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/dispatcher.cpp b/src/dispatcher.cpp index 51143b3..7115bca 100644 --- a/src/dispatcher.cpp +++ b/src/dispatcher.cpp @@ -17,6 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <new> + #include "../bindings/c/zmq.h" #include "dispatcher.hpp" @@ -49,7 +51,8 @@ zmq::dispatcher_t::dispatcher_t (int app_threads_, int io_threads_, // Create application thread proxies. for (int i = 0; i != app_threads_; i++) { - app_thread_t *app_thread = new app_thread_t (this, i, flags_); + app_thread_t *app_thread = new (std::nothrow) app_thread_t (this, i, + flags_); zmq_assert (app_thread); app_threads.push_back (app_thread); signalers.push_back (app_thread->get_signaler ()); @@ -57,15 +60,16 @@ zmq::dispatcher_t::dispatcher_t (int app_threads_, int io_threads_, // Create I/O thread objects. for (int i = 0; i != io_threads_; i++) { - io_thread_t *io_thread = new io_thread_t (this, i + app_threads_, - flags_); + io_thread_t *io_thread = new (std::nothrow) io_thread_t (this, + i + app_threads_, flags_); zmq_assert (io_thread); io_threads.push_back (io_thread); signalers.push_back (io_thread->get_signaler ()); } // Create command pipe matrix. - command_pipes = new command_pipe_t [signalers.size () * signalers.size ()]; + command_pipes = new (std::nothrow) command_pipe_t [signalers.size () * + signalers.size ()]; zmq_assert (command_pipes); // Launch I/O threads. |