Closed GoogleCodeExporter closed 9 years ago
This is a side effect of making the service to run in the same process. The
service should be started in a separate handler.
Original comment by ba...@google.com
on 7 Feb 2011 at 5:19
I actually talked with Brad Fitzpatrick about it and he said to just use
threads, they are cheap enough. I fixed some of the easy violations on void
methods. It is a little bit more difficult for methods that return values.
Original comment by sandordo...@google.com
on 7 Feb 2011 at 5:32
It's not about cheap vs expensive, it's more about whether you need to
synchronize or not. If you use a thread, make sure that all data being
accessed is thread safe. If you follow handler approach, you don't need
synchronization, if you make all your code use the handle, so that all data
access is serialized through the same handler (and the underlying thread).
Also, starting a new thread each time, although cheap, sounds to me like a bad
coding practice. And I'm surprised you got this suggestion from Brad.
Original comment by ba...@google.com
on 7 Feb 2011 at 5:38
[deleted comment]
[deleted comment]
Original comment by jshih@google.com
on 10 Sep 2012 at 7:19
Original comment by jshih@google.com
on 10 Sep 2012 at 7:19
Original comment by jshih@google.com
on 10 Sep 2012 at 7:28
Original issue reported on code.google.com by
sandordo...@google.com
on 7 Feb 2011 at 5:11