Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Serializable and Thread  RSS feed

 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read following stuff on Sun's Website.




[ September 02, 2005: Message edited by: Chetan Parekh ]
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 15865
81
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ofcourse you can, if you make a class that extends Thread and implements Serializable, you can serialize objects of that class. The article you refer to doesn't say it's impossible to serialize an object that extends Thread.

But it doesn't make much sense to serialize a thread-like object. Serialization makes sense for classes that are containers of data, not for "live" objects like threads, sockets etc.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!