cppzmq/tests
Pawel Kurdybacha faf6671d38 Problem: poller can segfault when modified from registered handler. (#219)
* Problem: poller can segfault when modified from registred handler.

It is possible that a user would like to add/remove sockets from
handlers. As handlers and poll items might be removed while not
being processed yet - we have a segfault situation.
Provided unit test `remove_from_handler` demonstrates the problem.

Solution: Modify internal poll item data structure only after processing
of events is finished.

Please not that events processing path performance remains the same when there are
no modification (add/remove) to the poller (no rebuild) - main real use case.

As an effect of changes `size()` method has been removed as it does not
represent any meaningful information anymore. There are active and pending
(waiting for rebuild) poll items so two different sizes. User can
easily track on their side number of registered sockets if original size
information is needed.

`wait` method returns number of processed sockets now. It might be
useful information to a user for no extra cost.
2018-05-03 21:10:05 +01:00
..
cmake Problem: googletest is also installed into install destination 2018-04-29 12:57:32 +01:00
CMakeLists.txt Problem: message_t should be easier to construct 2018-04-14 12:13:44 +01:00
context.cpp Problem: test file not correctly named 2018-04-03 18:41:44 +02:00
main.cpp Problem: no test infrastructure 2018-03-29 18:11:28 +02:00
message.cpp Problem: no tests for move-assignment 2018-04-13 11:35:00 -04:00
poller.cpp Problem: poller can segfault when modified from registered handler. (#219) 2018-05-03 21:10:05 +01:00
socket.cpp Problem: no tests for socket_t ctor accepting enum socket_type 2018-04-03 18:41:44 +02:00