Thursday July 22, 2010
| [Time] Name | Message |
|---|---|
| [01:31] ispot | hello, when I launched zmq_forwarder , I got "what (): no such device", why? |
| [03:25] guido_g | ispot: getting no answer on irc is a sure sign of a) question phrased in a way that nobody understands it or b) question is already solved by the docs/faqs or c) not enough information provided (close to a) or d) noone knows an answer |
| [07:51] ben_k | I dont think flush on ypipe is safe what happens if it wakes up after the check but before the set - unlikely but can happen |
| [08:16] sustrik | ben_k: what check and what set do you mean? |
| [09:04] ben_k | if (c.cas (w, f) != w) { |
| [09:04] ben_k | // Compare-and-swap was unseccessful because 'c' is NULL. |
| [09:04] ben_k | // This means that the reader is asleep. Therefore we don't |
| [09:04] ben_k | // care about thread-safeness and update c in non-atomic |
| [09:04] ben_k | // manner. We'll return false to let the caller know |
| [09:18] sustrik | ben_k: the point is that the reader is woken up only if writer finds out that it is asleep |
| [09:18] sustrik | and flush returns false |
| [09:18] sustrik | see pipe.cpp: |
| [09:18] sustrik | line 210: |
| [09:18] sustrik | void zmq::writer_t::flush () |
| [09:18] sustrik | { |
| [09:18] sustrik | if (!pipe->flush ()) |
| [09:18] sustrik | send_revive (peer); |
| [09:18] sustrik | } |
| [09:19] sustrik | send_revive is the function that wakes the reader |
| [09:19] ben_k | I see so this is a manual sleep not a scheduler sleep .. |
| [09:20] sustrik | yes |
| [09:25] ben_k | ty |
| [10:46] quatrix | Hey. is it possible to send() complex data structure/objects, or do I need to serialize them first? |
| [10:50] drbobbeaty | From what I've read, it appears that the real "payload" of the ZMQ message is a byte array - so you'll need to use your own serialization scheme on top of that. Like Google protobufs, or something similar. |
| [10:56] quatrix | thanks |