croservices / cro-zeromq

ZeroMQ support for the Cro library for building distributed systems in Raku.
https://cro.services/
Artistic License 2.0
6 stars 4 forks source link

Eliminate race conditions and fix tests #3

Open vrurg opened 3 years ago

vrurg commented 3 years ago

This PR solves two problems:

  1. Stopping a service results in X::AdHoc produced by Net::ZMQ::poll_one because of a closed socket.
  2. Polling threads started by Cro::ZeroMQ::Source::Impure and Cro::ZeroMQ::Source::Pure are not always ready to accept messages by the time the first ones are submitted. It was breaking t/zeromq-xpub-xsub.t test.