Bonjour,

J'utilise une fonction "bloquante" en java : Quand vous tappez la ligne, elle ne rend jamais la main.

J'ai donc fait ca :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
thread = new Thread(new Runnable()
			    	{
						public void run()
						{
							try
							{
								new Client(opts).loop();
								thread = null;
							}
							catch (IOException e)
							{
								System.err.println(e);
						    	Log.e(MSG_TAG, e.toString());
								thread = null;
							}
						}
					});
			    	thread.start();
Et mon code fonctionne très bien.

J'aimerais, pouvoir tuer ce processus, sans devoir quitter tous le programme.

J'ai odonc essayer des trucs avec :
thread.destroy();
thread.interrupt();
thread.stop();

Mais rien y fait.

Que doije faire ?

Cordialement,

Gaël PERRON..