Fix race condition when opening a buffer and getting a definition to it

This commit is contained in:
Antonio Scandurra 2022-01-24 18:47:41 +01:00
parent 93125cbd16
commit 96b66dcce1
7 changed files with 160 additions and 135 deletions

View file

@ -147,12 +147,9 @@ message GetDefinitionResponse {
}
message Definition {
oneof buffer {
uint64 id = 1;
Buffer state = 2;
}
Anchor target_start = 3;
Anchor target_end = 4;
Buffer buffer = 1;
Anchor target_start = 2;
Anchor target_end = 3;
}
message OpenBuffer {
@ -324,6 +321,13 @@ message Entry {
}
message Buffer {
oneof variant {
uint64 id = 1;
BufferState state = 2;
}
}
message BufferState {
uint64 id = 1;
optional File file = 2;
string visible_text = 3;