ConcurrentOpListConverter Class

Namespace: Improbable.Gdk.Core
GDK package: Core

Simplest possible current op-list-to-diff converter. Acquires a lock when deserializing an op list and releases it when done


  • This is not able to interrupt the deserialization thread to exchange diffs, which could increase latency when under heavy load. If this presents a problem it could be improved with either a more complicated lock or a lock free approach. Similarly if part of a critical section is received regularly the diffs may often not be possible to exchange, increasing latency. To solve this we could buffer critical sections into an intermediate object and then move them to the main diff. However this case is unlikely and the overhead associated with fixing it may be undesirable.


ParseOpListIntoDiff Source
void ParseOpListIntoDiff(OpList opList, CommandMetaDataAggregate commandMetaData)

Iterate over the op list and populate a ViewDiff from the data contained. Must not be called again before it returns.

TryGetViewDiff Source
bool TryGetViewDiff(out ViewDiff viewDiff)

Try to get a diff containing ops deserialized since the last call. If successful the diff may only contain part of the last op list.

True if the diffs could be exchanged and false otherwise.


Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums