Move operation serialization off the main thread

This commit is contained in:
Antonio Scandurra committed 2022-08-23 16:34:25 +02:00
1 parent 954695f5fe
commit f0d35ccc50
5 files changed
+57 -39

No files matched your search

+4 -1
View File
@@ -3304,7 +3304,10 @@ mod tests {
fn test_remote_multibuffer(cx: &mut MutableAppContext) {
let host_buffer = cx.add_model(|cx| Buffer::new(0, "a", cx));
let guest_buffer = cx.add_model(|cx| {
let (state, ops) = host_buffer.read(cx).to_proto();
let state = host_buffer.read(cx).to_proto();
let ops = cx
.background()
.block(host_buffer.read(cx).serialize_ops(cx));
let mut buffer = Buffer::from_proto(1, state, None).unwrap();
buffer
.apply_ops(