[mono-android] threads in c# vs java example, translated from mark murphy android tutorials

Jonathan Pryor jpryor at novell.com
Sat Mar 19 11:22:48 EDT 2011


On Mar 18, 2011, at 11:59 PM, Michael Isbell wrote:
> I'm reworking example number 8 (Threads) from Mark Murphy's Android Java tutorials. Got it working the first time.

I suppose a question that comes up is...why use Java.Lang.Thread instead of System.Threading.Thread? [0]

I understand that when porting code, using the same types is often easiest (hence Java.Lang.Thread), but for the code you provided I don't see any actual need to use it...

 - Jon

[0] For that matter, why use a Thread instead of the TPL of the ThreadPool? :-)

OK, ThreadPool.QueueUserWorkItem() is usually intended for "short" tasks, and your thread isn't, but it's always something to keep in mind...



More information about the Monodroid mailing list