fjlopezs / mytracks

Automatically exported from code.google.com/p/mytracks
0 stars 0 forks source link

[StrictMode] Fix StrickMode warning messages #301

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start recording a track with strict mode enabled.

What is the expected output? What do you see instead?
This should be done in a separate thread, probably returning a value with a 
future.

Please use labels and text to provide additional information.

Original issue reported on code.google.com by sandordo...@google.com on 7 Feb 2011 at 5:11

GoogleCodeExporter commented 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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by jshih@google.com on 10 Sep 2012 at 7:19

GoogleCodeExporter commented 9 years ago

Original comment by jshih@google.com on 10 Sep 2012 at 7:19

GoogleCodeExporter commented 9 years ago

Original comment by jshih@google.com on 10 Sep 2012 at 7:28