Absolute index bulk put/get byte operations on ByteBuffer
Stuart Marks
stuart.marks at oracle.com
Tue Sep 11 04:13:21 UTC 2018
On 9/7/18 5:04 AM, Martin Thompson wrote:
> I've tried to migrate a number of projects away from using Unsafe but issues
> like this keep hampering progress. When is Panama likely to deliver? Until then
> will Unsafe be available?
>
> It would be really nice to have a better alternative but until then it feels
> wrong to keep putting off fixing an immediate need for some solution that might
> come in the future.
Hi Martin,
Yes, I think it's reasonable to consider fixing some immediate needs instead of
waiting for Panama. I'm confident there are some improvements we can make in the
near term, and we can manage coordination with Panama.
I don't think you need to worry about Unsafe going away before there is a
suitable replacement.
On that note, what kinds of issues have you run into trying to migrate away from
Unsafe? There's the absolute indexing, and there's also the 2GB limit as Alan
mentioned. I'm certain there are others.
What I'd like to avoid is a situation where we add, say, absolute indexing to
buffers, and then have the response be "thanks, that helps a little, but it
really doesn't solve the problem without X, Y, and Z." I'd like to know more
about X, Y, and Z.
Thanks,
s'marks
More information about the nio-dev
mailing list