You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea is you called this first and it would return a buffer for the next available slot. The reader wouldn't be able to get to this buffer yet. You'd cast the buffer as a ctypes Structure and populate it with whatever information you have. Then you'd call write_finished() on the buffer. At that point readers would then be able to read the slot.
Doing it this way would avoid the extra copy that writers do and let them directly populate the slot. The key point of this design is it would have to avoid holding the writer lock during this time. It would just prevent other readers or writers from progressing until this slot was full.
The text was updated successfully, but these errors were encountered:
bslatkin
changed the title
Add a try_reserve_write() method to avoid extra copies
Add a try_reserve_write() method to avoid extra copies on write
Aug 8, 2016
The idea is you called this first and it would return a buffer for the next available slot. The reader wouldn't be able to get to this buffer yet. You'd cast the buffer as a ctypes Structure and populate it with whatever information you have. Then you'd call write_finished() on the buffer. At that point readers would then be able to read the slot.
Doing it this way would avoid the extra copy that writers do and let them directly populate the slot. The key point of this design is it would have to avoid holding the writer lock during this time. It would just prevent other readers or writers from progressing until this slot was full.
The text was updated successfully, but these errors were encountered: