Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Thanks, I completely forgot about using shared memory between processes. Lately I used exclusively sockets, as it provides a portable solution between languages and platforms. But you are right, it is not suitable for realtime or low latency applications.

Still I think the implementation in the article is bad, and you should avoid using it in production, because it uses too much busy waits and there is no error handling.

And if one don't use shared memory, just threads (as in the example code) you gain nothing from this solution. You'd better use a simple lock-based implementation, or if you need low latency a correct lock-free or even better, a wait-free queue.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: