Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,738,152 Members 54,570 Now Online
XDA Developers Android and Mobile Development Forum
View Poll Results: Was this information helpful?
Yes 4 100.00%
Somewhat 0 0%
No 0 0%
Voters: 4. You may not vote on this poll

[GUIDE][INFO]Concurrency and Threads

Tip us?
 
sak-venom1997
Old
(Last edited by diestarbucks; 12th March 2014 at 12:27 AM.) Reason: added content
#1  
sak-venom1997's Avatar
Senior Member - OP
Thanks Meter 403
Posts: 919
Join Date: Feb 2013
Location: Lucknow

 
DONATE TO ME
Post [GUIDE][INFO]Concurrency and Threads

Mod Edit: You can find this guide in it's entirety here:

http://docs.oracle.com/javase/tutori...ncy/index.html

There is no need to copy/paste the entire thing.
The Following 10 Users Say Thank You to sak-venom1997 For This Useful Post: [ Click to Expand ]
 
Androguide.fr
Old
#2  
Androguide.fr's Avatar
Recognized Contributor
Thanks Meter 6930
Posts: 2,052
Join Date: Jul 2012
Location: Lyon, France

 
DONATE TO ME
Quote:
Originally Posted by sak-venom1997 View Post
thank you !
but is there someone really in need of this ?

Sent from my GT-S5302 using Tapatalk 2
Very nice guide.
Judging by the amount of laggy apps that block the UI thread, I'd say a lot of people are in need of this

Quote:
My Contributions
(Apps, Librairies, Roms & Guides)
 

Pimp My Rom: Website / App / Thread

dSploit: Website / Github

Flash Gordon (Flash zips without a recovery): Thread

Universal init.d: App

PlayView/CardsUI Library: Portal / Github

HoloGraph Library: Portal / Github

Ubuntu Touch for i9300: Thread

Omni nightlies for Xperia Z1: Thread

Paranoid Android builds: Thread

Revive your bricked p68xx : Guide
Follow me on Github
The Following 2 Users Say Thank You to Androguide.fr For This Useful Post: [ Click to Expand ]
 
TRusselo
Old
(Last edited by TRusselo; 11th March 2014 at 11:05 PM.)
#3  
TRusselo's Avatar
Retired Forum Moderator / Recognized Developer
Thanks Meter 2756
Posts: 4,682
Join Date: Jan 2011
Location: Edmonton

 
DONATE TO ME
All info is COPIED almost word for word from Oricle (Java) website.

http://docs.oracle.com/javase/tutori...ncy/sleep.html

from above:
Quote:
Thread.sleep causes the current thread to suspend execution for a specified period. This is an efficient means of making processor time available to the other threads of an application or other applications that might be running on a computer system. The sleep method can also be used for pacing, as shown in the example that follows, and waiting for another thread with duties that are understood to have time requirements, as with the example below.

Two overloaded versions of sleep are provided: one that specifies the sleep time to the millisecond and one that specifies the sleep time to the nanosecond. However, these sleep times are not guaranteed to be precise, because they are limited by the facilities provided by the underlying OS. Also, the sleep period can be terminated by interrupts. In any case, you cannot assume that invoking sleep will suspend the thread for precisely the time period specified.
from Java site:
Quote:
Thread.sleep causes the current thread to suspend execution for a specified period. This is an efficient means of making processor time available to the other threads of an application or other applications that might be running on a computer system. The sleep method can also be used for pacing, as shown in the example that follows, and waiting for another thread with duties that are understood to have time requirements, as with the SimpleThreads example in a later section.

Two overloaded versions of sleep are provided: one that specifies the sleep time to the millisecond and one that specifies the sleep time to the nanosecond. However, these sleep times are not guaranteed to be precise, because they are limited by the facilities provided by the underlying OS. Also, the sleep period can be terminated by interrupts, as we'll see in a later section. In any case, you cannot assume that invoking sleep will suspend the thread for precisely the time period specified.
 
uprightbass360
Old
#4  
Senior Member
Thanks Meter 38
Posts: 128
Join Date: Dec 2012
Quote:
Originally Posted by sak-venom1997 View Post
thank you !
but is there someone really in need of this ?

Sent from my GT-S5302 using Tapatalk 2
I am in the second quarter of an applications developer program and I will be taking a class on android programming next year. This is very interesting and at the point that I am at in my C# studies this makes some sense even though I don't know a lick of java yet. These are the most valuable stories on XDA in my opinion, it is not a walk through, it is actual factual information on a specific subject from the standpoint of an android developer. It is write ups like this that may not be wow topics, but in the end serve very useful in a forum that is dominated by overly simplistic topics. Keep it up
 
diestarbucks
Old
#5  
diestarbucks's Avatar
Forum Moderator
Thanks Meter 4136
Posts: 3,176
Join Date: Aug 2009
Location: Greensboro
Quote:
Originally Posted by sak-venom1997 View Post
Mod Edit: You can find this guide in it's entirety here:

http://docs.oracle.com/javase/tutori...ncy/index.html

There is no need to copy/paste the entire thing.
Thread closed.
The Following User Says Thank You to diestarbucks For This Useful Post: [ Click to Expand ]
Tags
concurrency, multi treading, processes, threads
THREAD CLOSED
Subscribe
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes