blockedqueue implementation

need to test and fix errors