I'm re-posting a discussion on implementing the M109 from reprap forums:

I’m re-posting a discussion on implementing the M109 from reprap forums: http://forums.reprap.org/read.php?146,303976

Look at the Repetier code, it may give some insight. Looks like they wait for the current buffer to drain (complete all moves) then set the temperature and wait in a loop for the temperature to be hit and report the current temperature every second.