Exforsys

Online 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

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-14-2006, 05: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
  #2 (permalink)  
Old 03-22-2007, 06: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

Thread Tools

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
First Thread : Wildtune.com insane WebSite Reviews 2 07-17-2006 07:20 PM
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 07:27 AM
Visual Basic : .NET Remoting and Event Handling in VB .NET, Part 2 techguru Visual Basic Tutorials 0 08-28-2005 07:27 PM
Visual Basic : .NET Remoting and Event Handling in VB .NET, Part 3 techguru Visual Basic Tutorials 0 08-28-2005 03:26 PM
Have any pattern about the error handling paopaoer Software Patterns 0 10-19-2004 08:10 AM


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


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.