Como passar variáveis ​​do thread para o ambiente externo?

Eu tenho um Thread aninhado na atividade principal:

public class MainActivity extends Activity {

    public void onCreate(Bundle savedInstanceState) {
    setContentView(R.layout.activity_main);

    new Thread(new Runnable(){
        public void run() {
            int myInt = 1;
            // Code below works fine and shows me myInt
            TextView textView = (TextView) findViewById(R.id.text_view);
            textView.setText(myInt);
        }
    }).start();

    // Code below doesn't work at all
    TextView textView = (TextView) findViewById(R.id.text_view);
    textView.setText(myInt);

}

Não tenho certeza se essa estrutura está correta. Como devo passarmyInt variável para oMainActivity então ele se tornará reconhecível e operável fora do Thread?

questionAnswers(3)

yourAnswerToTheQuestion