• Post Reply Bookmark Topic Watch Topic
  • New Topic

keeping track of client ids

 
Johann Carl Friedrich Gauss
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
suppose i decide to use object serialization instead of RMI
on the server, i spawn a thread for each connected client that services that client. the name of each thread is a positive integer, i.e. "1", "2", "3"...
now, when a client calls lock(int) or unlock(int), the methods check the name of the current thread executing them...that tells which client is locking or unlocking...
is this a decent idea, or am i thinking about it all wrong?
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!