Skip to content

feat: BlockEncoder#encode and BlockDecoder#decode can be async#282

Open
gobengo wants to merge 3 commits into
multiformats:masterfrom
gobengo:blockasync-1702285349
Open

feat: BlockEncoder#encode and BlockDecoder#decode can be async#282
gobengo wants to merge 3 commits into
multiformats:masterfrom
gobengo:blockasync-1702285349

Conversation

@gobengo

@gobengo gobengo commented Dec 11, 2023

Copy link
Copy Markdown
Contributor

I want to be able to use async functions in my Block encode/decode.

@gobengo

gobengo commented Dec 11, 2023

Copy link
Copy Markdown
Contributor Author

wdyt @Gozala @rvagg ?

@rvagg

rvagg commented Dec 13, 2023

Copy link
Copy Markdown
Member

What async codecs do you need this for? is it for codecs involving encryption, or something else? It's just unfortunate to introduce an async in createUnsafe which is supposed to be the fast one. I think it'd be mostly optimised away in the common case of codecs that are sync, but it is a slightly annoying UX hurdle when we've been exporting this as sync the whole time.

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