typeintandem / tandem

Typing in Tandem. Decentralized, cross-editor, collaborative text-editing!
Apache License 2.0
698 stars 20 forks source link

Create, send and apply patches from plugin through agent/CRDT #50

Closed rageandqq closed 6 years ago

rageandqq commented 6 years ago

This diff adds:

In doing so, I added two semaphore/locks.

  1. The first is a semaphore, used to halt the UI (self._ui). We do this so that when we are processing the buffer for input changes, no one writes to the buffer (reading & writing concurrently to vim.current.buffer causes a race condition, resulting in termination of the vim process).
  2. The other is a lock (self._read_write_check), used to ensure that only one of the three threads (document synced, input checker, output checker) can be running at a time. This makes sure that
rageandqq commented 6 years ago

Linking issue: https://github.com/geoffxy/tandem/issues/40