Your listener on the port should be a seperate thread....that thread will
keep listening to the events asynchronously...In the main thread, you can
put Thread.sleep and make that wait.

Hope it helps.
+Deepak.

**********************************
Silence is safer than speech.
**********************************

----- Original Message -----
From: "Steven" <[EMAIL PROTECTED]>
To: "JDJList" <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 9:26 AM
Subject: [jdjlist] Thread.sleep problem...Please help


> Hi All,
>
> I am doing a Java application right now. In this application, some actions
> need to be taken only after few seconds. I thought Thread.sleep is the
good
> way to do it but while the program is sleeping, my com port listener will
be
> unable to perform any action.
> So may I know what is the best way to make the action few seconds later
but
> the com port listener still listening the coming event?
> Hope can help. Thank you.
>
>
>
>
>
> Steven
>
>
> To change your membership options, refer to:
> http://www.sys-con.com/java/list.cfm
>


To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

Reply via email to