Skip to content

Conversation

@fbacchella
Copy link
Contributor

Simplified Mailbox, always thread safe, so MailboxSafe usages are removed and the class is marked at deprecated.

@trevorbernard
Copy link
Member

Since Sockets are known to be to be not thread safe, what is the purpose if making internals thread safe? It might the case we're adding extra work for no material gain.

@trevorbernard
Copy link
Member

This PR satisfies all c4 requirements so I must merge but it's worth considering my question. I do not know the answer.

@fbacchella
Copy link
Contributor Author

fbacchella commented Jan 16, 2023

Mailbox was using YPipe, a class that is really complicated to understand and ensure to be correct. It this class could be totally removed, it would be really better for reliability of jeromq. I’m also investigating #905, and especialy #905 (comment) and I’m chasing down many occurrence of non compliance of java memory model, where a non-protected or non volatile variable could be access with wrong values.

The original author was not totally sure of thread usage, as he added some lock. Either they are to be removed, or the class made thread safe. I choose the way that open the most usage.

MailboxSafe was handling concurrency in a custom way, using a standard class should improve reliability too.

@trevorbernard trevorbernard merged commit 4387bed into zeromq:master Jan 16, 2023
@fbacchella fbacchella deleted the simple_mailbox branch January 16, 2023 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants