Teach UI thread to use main thread resources