Skip to content

rework block decoding framework#22

Merged
Kubuxu merged 1 commit intomasterfrom
feat/decoder-redux
Jul 11, 2017
Merged

rework block decoding framework#22
Kubuxu merged 1 commit intomasterfrom
feat/decoder-redux

Conversation

@Stebalien
Copy link
Copy Markdown
Member

  1. Use an interface instead of a map so that we can define fancier block
    decoders.
  2. Make DefaultBlockDecoder thread safe.

1. Use an interface instead of a map so that we can define fancier block
   decoders.
2. Make DefaultBlockDecoder thread safe.
@Stebalien
Copy link
Copy Markdown
Member Author

@whyrusleeping I can also go ahead and implement an RCU now if you're concerned about speed.

@Kubuxu
Copy link
Copy Markdown
Member

Kubuxu commented Jul 11, 2017

Acquiring ReadLock if there are no contesting writes is only matter of incrementing one atomic int so I don't think performance will suffer in this case. https://golang.org/src/sync/rwmutex.go

@Stebalien
Copy link
Copy Markdown
Member Author

An atomic load should be an order of magnitude faster than an atomic add but that probably makes no difference in the grand scheme of things.

@whyrusleeping
Copy link
Copy Markdown
Member

ship it 🚢 🐑

@Kubuxu Kubuxu merged commit c72f1b0 into master Jul 11, 2017
@Stebalien Stebalien deleted the feat/decoder-redux branch July 12, 2017 05:39
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.

3 participants