Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upBenchmarks: wrap the IpcSender in a mutex #121
Conversation
|
could we clone the sender instead? Seems like locking kind of would affect the benchmarks right? |
|
Good question, but AFAIK no we cannot. I tried that first and didn't get anywhere. Then I noticed that |
|
What @emilio said: the whole point of #115 is that senders should be cloned, rather than sharing references across threads... This also allows getting rid of (When I wrote the benchmark, I didn't have a good understanding of the interactions yet; and IIRC the @danlrobertson if you are not sure how to do this, I can whip up a PR myself. |
|
BTW, depending on the platform, cloning the |
|
Yup. Feel free to close this PR if you already have an implementation of this. I just wanted to post what I had to get benchmarks working again |
|
Here it is: #122 I actually made two patches: the first one is a minimal fix (hint: the trick is in the mysterious |
|
superseded by #122 |
dlrobertson commentedNov 11, 2016
•
edited
After e6ea839
IpcSendersare notSyncand therefore the implicit capture in the closure will cause compile
time failures. If the size is greater than the result of
get_max_fragment_sizewrap theIpcSenderin aMutex.This is what I used to get benchmarks working again for my tests of #94
Fixes: #120