refactoring for syncronize send/recv commands by queue