[forge-commits] [forge/core] 166f7d: FORGE-593 Converted the console input queue to a s...

George Gastaldi gegastaldi at gmail.com
Mon Jul 8 09:37:49 EDT 2013


  Branch: refs/heads/master
  Home:   https://github.com/forge/core
  Commit: 166f7dcbb1ac4b0a2a05c262f5574698f6e525f0
      https://github.com/forge/core/commit/166f7dcbb1ac4b0a2a05c262f5574698f6e525f0
  Author: Vineet Reynolds <Vineet.Reynolds at gmail.com>
  Date:   2013-07-07 (Sun, 07 Jul 2013)

  Changed paths:
    M shell/src/main/java/org/jboss/forge/shell/buffers/ConsoleInputSession.java

  Log Message:
  -----------
  FORGE-593 Converted the console input queue to a shared one.

The blocking queue in ConsoleInputSession is converted to a static
shared queue to ensure that characters input by a user that are captured
by an eventually terminating reader thread will not be lost (by pushing
them in a per-thread queue). Instead, the characters are now pushed into
a shared queue where they may be read without any loss.

This is a hack to ensure that characters are not lost. Ideally, in a
multiple reader thread situation, this should have been done by ensuring
that the reader thread obtained just the right number of characters from
System.in and eventually terminated gracefully. But, reads on System.in
are blocking by nature, and Windows does not provide information on the
number of characters to be read via InputStream.available(). Hence
the hack.


  Commit: 3a9c06d6bd6858563c0ae7731b64a354d6752444
      https://github.com/forge/core/commit/3a9c06d6bd6858563c0ae7731b64a354d6752444
  Author: George Gastaldi <gegastaldi at gmail.com>
  Date:   2013-07-08 (Mon, 08 Jul 2013)

  Changed paths:
    M shell/src/main/java/org/jboss/forge/shell/buffers/ConsoleInputSession.java

  Log Message:
  -----------
  Merge pull request #328 from VineetReynolds/FORGE-593

FORGE-593 Converted the console input queue to a shared one.


Compare: https://github.com/forge/core/compare/8c0103dc1748...3a9c06d6bd68


More information about the forge-commits mailing list