Spinodal decomposition with formation of a glassy phase