int zmq::socket_base_t::close () { // Transfer the ownership of the socket from this application thread // to the reaper thread which will take care of the rest of shutdown // process. send_reap (this); return 0; }
int zmq::socket_base_t::close () { scoped_optional_lock_t sync_lock(thread_safe ? &sync : NULL); // Remove all existing signalers for thread safe sockets if (thread_safe) ((mailbox_safe_t*)mailbox)->clear_signalers(); // Mark the socket as dead tag = 0xdeadbeef; // Transfer the ownership of the socket from this application thread // to the reaper thread which will take care of the rest of shutdown // process. send_reap (this); return 0; }