Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-05-2008, 07:36 AM
Member
 
Join Date: Dec 2007
Posts: 38
rameshraj is on a distinguished road
Thread communications!
Hi everybody,I want to send some message or data to a thread.I have got the thread id.How can I achieve this?
In general I want to have thread communication.Can anyone help me?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-05-2008, 08:01 AM
sanjeevtarar's Avatar
Senior Member
 
Join Date: Apr 2008
Location: Delhi(India)
Posts: 249
sanjeevtarar is on a distinguished road
Can you explain some more..?
__________________
sanjeev,संजीव
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 05-05-2008, 08:03 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,512
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
What you really want to do? Communicating on a thread? May be in a specific time interval? Explain it more pal.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 05-05-2008, 08:33 AM
danielstoner's Avatar
Senior Member
 
Join Date: Apr 2008
Location: Canada
Posts: 191
danielstoner is on a distinguished road
A thread is an execution path in your program. You cannot send data to a thread. You can make the thread access some data, check for data, wait for data and so on.
__________________
Daniel @ [
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
]
Language is froth on the surface of thought
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 05-05-2008, 09:40 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,512
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Well say Daniel.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 05-06-2008, 11:09 AM
Member
 
Join Date: Dec 2007
Posts: 38
rameshraj is on a distinguished road
A thread listening on some dataStreams and I want such thread to send data via the dataStreams used.I have the thread's id also.Is is possible?
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 05-06-2008, 03:20 PM
danielstoner's Avatar
Senior Member
 
Join Date: Apr 2008
Location: Canada
Posts: 191
danielstoner is on a distinguished road
You can make a thread wait on a "data stream" as long as the "data stream" read API is written in such a way that will make the thread that is trying to read to wait until data is available and then notifies it. An example is the sockets API. So yes, it is possible. But again you don't send data to a thread, you notify a thread waiting for your data that the data has become available.
__________________
Daniel @ [
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
]
Language is froth on the surface of thought
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 05-11-2008, 01:18 PM
Member
 
Join Date: Dec 2007
Posts: 38
rameshraj is on a distinguished road
Thank you very much
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

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

vB 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
data from the main/GUI thread to another runnin thread... cornercuttin Threads and Synchronization 2 04-23-2008 11:30 PM
How to get thread name Java Tip java.lang 0 04-09-2008 07:40 PM
If JNI thread call the java object in another thread, it will crash. skaterxu Advanced Java 0 01-28-2008 08:02 AM
Creating a Thread (extending Java Thread Class) JavaForums Java Blogs 0 12-19-2007 10:31 AM
using Thread one198 New To Java 1 11-21-2007 09:01 AM


All times are GMT +3. The time now is 11:50 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org