Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #2261

Re: Please help me kill this java thread..... code example

Received by 10.224.220.136 with SMTP id hy8mr1090776qab.3.1352992192766; Thu, 15 Nov 2012 07:09:52 -0800 (PST)
Received by 10.49.37.105 with SMTP id x9mr320113qej.26.1352992192752; Thu, 15 Nov 2012 07:09:52 -0800 (PST)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!u2no4781933qal.0!news-out.google.com!gf5ni57984567qab.0!nntp.google.com!u2no4811716qal.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.help
Date Thu, 15 Nov 2012 07:09:52 -0800 (PST)
In-Reply-To <b18cadc9-199f-4900-9f44-b25ec90acbd4@googlegroups.com>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=129.6.84.222; posting-account=ZtUOcwoAAAAeXxE36qjxoPmXFemAFzGD
NNTP-Posting-Host 129.6.84.222
References <b18cadc9-199f-4900-9f44-b25ec90acbd4@googlegroups.com>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <4e56eec9-e5d5-4452-a8c5-de90d175426c@googlegroups.com> (permalink)
Subject Re: Please help me kill this java thread..... code example
From kedward777@gmail.com
Injection-Date Thu, 15 Nov 2012 15:09:52 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.java.help:2261

Show key headers only | View raw


 Here is the scanner while loop:

public synchronized void launchScanner(){
        // Get physical scanner device list
        devList = Symbol.getScannerDeviceList();
        if (devList == null){
            System.out.println("No physical scanner device available");
            return;
        }

        // Create and enable scanner
        try{
                scanner = new Scanner(devList[0]);
                scanner.enable();
                scanEnabled = true;
        }catch (Exception e){
            System.out.println("can't initialize scanner object: " + e.getMessage());
            return;
        }
		
        exiting = false;
        while (!exiting){
            try{
          
                    scanner.read(null, this);
                    wait();
            }catch (Exception e){
                   System.out.println("Got Error: " + e.getMessage());
                return;
            }
        }
			
    }

Back to comp.lang.java.help | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Please help me kill this java thread..... code example kedward777@gmail.com - 2012-11-15 07:06 -0800
  Re: Please help me kill this java thread..... code example kedward777@gmail.com - 2012-11-15 07:09 -0800
    Re: Please help me kill this java thread..... code example Knute Johnson <nospam@knutejohnson.com> - 2012-11-15 08:42 -0800
  Re: Please help me kill this java thread..... code example Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-15 11:49 -0500
    Re: Please help me kill this java thread..... code example kedward777@gmail.com - 2012-11-15 10:16 -0800
      Re: Please help me kill this java thread..... code example Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-15 13:33 -0500
        Re: Please help me kill this java thread..... code example kedward777@gmail.com - 2012-11-15 10:56 -0800
          Re: Please help me kill this java thread..... code example Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-15 14:21 -0500
  Re: Please help me kill this java thread..... code example Roedy Green <see_website@mindprod.com.invalid> - 2012-11-15 13:37 -0800

csiph-web