Age | Commit message (Collapse) | Author |
|
For historical reasons queue to transfer commands between
threads was called 'signaler'. Given that it was used to
pass commands rather than signals it was renamed to 'mailbox',
see Erlang mailboxes.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Threads were so far identified by integers called 'slots'.
This patch renames them to more comprehensible 'tid's (thread IDs).
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
If the socketpair used by signaler_t fills up, this can lead to deadlock.
This patch provides partial resolution by attempting to resize SO_SNDBUF on
the writer side, and if that fails we shall at least assert rather than
hang.
I've also refactored the signaler_t code to make the platform-dependent
parts clearer and have tested both the MSG_DONTWAIT and standard POSIX path
in recv.
The Win32 implementation currently does not implement resizing as I'm not
convinced that it's safe, but it will also assert like other platforms if
signaler_t::send() cannot succeed.
The OpenVMS implementation has been carried forward but is untested.
Signed-off-by: Martin Lucina <mato@kotelna.sk>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
If, when compiling 0MQ you don't set FD_SETSIZE,
it defaults to 1024 rather than to 64.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Devpoll polling mechanism used ZMQ_HAVE_SOLRIS instead of
ZMQ_HAVE_SOLARIS in one case. Fixed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
devpoll_t used this constant to determine how many events to
retrieve from the poller in one go. The implementation was
changed not to depend on this constant.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Mikael Helbo Kjaer <mhk@designtech.dk>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
|
|
Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
|
|
To use __rdtsc() function MSVC2005 requires including intrin.h
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
|
|
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
|
|
* maint:
SunStudio fixed.
|
|
With SunStudio's implementation of STL basic_string constructor
doesn't accept NULL as a parameter even though size of string
is set to zero. Fixed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
1. ZMQ_LINGER option can be set/get
2. options are part of own_t base class rather than being declared
separately by individual objects
3. Linger option is propagated with "term" command so that the
newest value of it is used rather than the stored old one.
4. Session sets the linger timer if needed and terminates
as soon as it expires.
5. Corresponding documentation updated.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Toralf Wittner <toralf.wittner@gmail.com>
|
|
"warning: extra ';' inside a struct or union [-pedantic]"
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
* maint:
Fix memory leak under Windows
|
|
The comment about memory ownership in uuid_t::to_string
was misleading as on most platforms the buffer is a field
of the object;
The string allocated in UuidToString() wasn't properly freed
with RpcStringFree()
Signed-off-by: Taras Shpot <taras.shpot@eleks.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
|
|
Function clock_t::rdtsc() now returns correct value when compiled
with sunstudio 12 compiler.
Signed-off-by: Martin Pales <m.pales@gmail.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
A minor workaround to resolve compilation error with sunstudio compiler,
which does not yet support member templates for std::multimap.
Signed-off-by: Martin Pales <m.pales@gmail.com>
|
|
zmq_msg_close now empties the message on zmq_msg_close, thus not
leaving random data in the structure, that may be mistaken for
a valid message.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
A minor typo correction to resolve compilation error on Solaris.
Signed-off-by: Martin Pales <m.pales@gmail.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Session base class now handles the engine events exclusively. It notifies
derived session types using dedicated "attached" and "detached" events.
Couple of bugs was fixed along the way.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
When a session is being closed down its inbound and outbound
pipe pointers are set to null. If (re) connection happens at
that time, session may try to reinistantiate the pipes which
is wrong. This patch allows session to attach pipes only once
in its lifetime.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
|
|
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
|
|
The patch was supposed to check that pipe writer sends messages
in atomic fashion. However, it prevented the user to read
half of a message and close the socket.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Since executing the timers might modify the source pollsets we have
to defer the initialisation until after the timers have executed.
Signed-off-by: Christian Gudrian <christian.gudrian@fluidon.com>
|
|
* maint:
Version macros added
Conflicts:
builds/msvc/platform.hpp
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Macro ZMQ_VERSION represents the current version of 0MQ
Macro ZMQ_MAKE_VERSION(major,minor,patch) allows to create
a representation of the specified version.
The versions can be compared using simple <, >, ==, etc.
operators.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Missed testing on Win32
Signed-off-by: Martin Lucina <mato@kotelna.sk>
|