Uploaded image for project: 'Aesh'
  1. Aesh
  2. AESH-459

TerminalConnection synchronisation issue

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Critical Critical
    • 1.1
    • None
    • main
    • None

      The waiting state and the latch instance used to wait are not atomically set. Imagine from thread1 (connection reading thread) set waiting=true, then the check (waiting == true) is done, the thread enters the block and stop executing. Thread2 is scheduled and call awake. latch has not been yet set so no countDown is called. Thread1 is scheduled, creates a latch and wait.
      ==> This thread will never be scheduled again, this stuck the connection.

      Proposal is to have latch be instantiated when waiting is set to true, so whatever the time awake is called, countDown is called on the right latch.

            spederse@redhat.com Stale Pedersen
            jdenise@redhat.com Jean Francois Denise
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: