Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2007

Tip: Looking for answers? Try searching our database.

SelectableChannel.register() & thread safety question

Thread view: 
Axel Bock - 12 Mar 2007 14:55 GMT
Hi,

my question is about the thread safety of the
SelectableChannel.register() method. In my first thread I would like
to register channels (serverChannels) to a Selector instance, while a
second thread actually calls selector.select().

Now the thing is - does anybody know if that could actually work, or
is that a bad idea?

Greetings & thanks for your efforts already,
Axel.
Daniel Pitts - 12 Mar 2007 19:57 GMT
> Hi,
>
[quoted text clipped - 8 lines]
> Greetings & thanks for your efforts already,
> Axel.

According to <http://java.sun.com/j2se/1.5.0/docs/api/java/nio/
channels/SelectableChannel.html>
"Selectable channels are safe for use by multiple concurrent threads."


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.