# Continuous function on compact is integrable

For a compact subset $$X \subset \mathbb{R}^n$$ and a continuous function $$f : X \to \mathbb{C}$$, $$f$$ is integrable on $$X$$ ( as both $$X$$ and $$f$$ will be bounded). Does this generalise? That is, if $$X$$ is a compact measure space and $$f : X \to \mathbb{C}$$ is a continuous function, under which circumstances (i.e. under which assumptions on the topology of $$X$$ and under which assumptions on the measure on $$X$$) is it true that $$f$$ is integrable on $$X$$? Thanks for any help!

It works if $$X$$ is compact and the measure of $$X$$ is finite since then $$\int_X |f| d\mu \leq \int_X \max(|f|) d\mu = \max(|f|) \mu(X).$$