import alarm and thread_cached from experimental branch