07.01.2013 Views

David Defour - Université de Perpignan

David Defour - Université de Perpignan

David Defour - Université de Perpignan

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Main App Implements Runnable:<br />

Template Co<strong>de</strong><br />

699<br />

public class Threa<strong>de</strong>dActivity extends Activity<br />

implements Runnable {<br />

public void run() {<br />

// Co<strong>de</strong> to run in background. Don’t update UI.<br />

}<br />

}<br />

jeudi 26 janvier 12<br />

public void startSomeThreads() {<br />

int poolSize = ...;<br />

ExecutorService taskList =<br />

Executors.newFixedThreadPool(poolSize);<br />

for(int i=0; i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!