Exforsys

Free Training

Thread Handling

This is a discussion on Thread Handling within the Java forums, part of the Programming Talk category; I am just starting my hands on threads in Java. I want to mention that only one thread should execute ...

Go Back   Exforsys > Programming Talk > Java

Exforsys.com

  #1 (permalink)  
Old 12-14-2006, 04:50 AM
Member
 
Join Date: Apr 2006
Posts: 65
priyaraji is on a distinguished road
Thread Handling

I am just starting my hands on threads in Java. I want to mention that only one thread should execute the method at a time. Is this possible. How can I do this.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-22-2007, 05:37 AM
Software Developer
 
Join Date: Feb 2007
Location: Pune
Posts: 3
pushkarmundhare is on a distinguished road
Smile Yes u can....

Quote:
Originally Posted by priyaraji View Post
I am just starting my hands on threads in Java. I want to mention that only one thread should execute the method at a time. Is this possible. How can I do this.

U can Do that. For execution of only one Thread special methode given by the JAVA that is " SetPriority " . U can set the Priority of the Thread. For that priority Only the specific Thread will be Executed. And start that Thread in for( ; ; ) Loop, call the Thread.sleep(); outside that loop. So that Loop never end and Thread doesn't stop.
Try this.... By using this u can do the prg. of Moving Banner also.
__________________
!! Dont Worry Be Happy !!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Visual Basic : Make the Transition from Traditional Visual Basic Error Handling to the Object-Oriented Model in .NET techguru Visual Basic Tutorials 0 08-29-2005 06:27 AM
Visual Basic : .NET Remoting and Event Handling in VB .NET, Part 2 techguru Visual Basic Tutorials 0 08-28-2005 06:27 PM
Visual Basic : .NET Remoting and Event Handling in VB .NET, Part 3 techguru Visual Basic Tutorials 0 08-28-2005 02:26 PM
Have any pattern about the error handling paopaoer Software Patterns 0 10-19-2004 07:10 AM


All times are GMT -4. The time now is 12:12 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright 2004 - 2009 Exforsys Inc. All rights reserved.