Heavy computation

In my UI I have button that call method which do heavy computation and if I want to push another button its buttonclick method will be executed only after end of that heavy computation. How can i solve this problem?

You need to do the heavy computation in another thread.