optimized thread interaction.