openraft icon indicating copy to clipboard operation
openraft copied to clipboard

storage apply entry is single thread ? why this need send && sync trait

Open ChiaoTeo opened this issue 4 years ago • 2 comments

if I can unsafe impl send and sync for my data structure. it only modify at apply entry

ChiaoTeo avatar Nov 03 '22 10:11 ChiaoTeo

👋 Thanks for opening this issue!

Get help or engage by:

  • /help : to print help messages.
  • /assignme : to assign this issue to you.

github-actions[bot] avatar Nov 03 '22 10:11 github-actions[bot]

I guess it has to be shared between threads by reference. I did not dig deep into this question, but remove Sync and Send, I guess the compiler will tell you why it has to be sync and send. :D

drmingdrmer avatar Nov 03 '22 13:11 drmingdrmer